# Update updates an application

`PUT /api/v1/applications/{application.metadata.name}`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: apiKey, header Authorization. A token sent as `Authorization: Bearer <token>`. [API Docs](https://sourcey-argocd.pages.dev/developer-guide/api-docs/index.md#authorization) shows how to get one.

Parameters:

- `application.metadata.name` (path, string, required) - Name must be unique within a namespace. Is required when creating resources, although
some resources may allow a client to request the generation of an appropriate name
automatically. Name is primarily intended for creation idempotence and configuration
definition.
Cannot be updated.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
+optional
  Type: string

- `validate` (query, boolean, optional)
  Type: boolean

- `project` (query, string, optional)
  Type: string

Request body: application/json (required)

Type: object

Schema: [v1alpha1Application](https://sourcey-argocd.pages.dev/api/models/v1alpha1application/index.md)

- `metadata` (optional)
  Reference: [v1ObjectMeta](https://sourcey-argocd.pages.dev/api/models/v1objectmeta/index.md); Type: object
  
  ObjectMeta is metadata that all persisted resources must have, which includes all objects
  users must create.

- `operation` (optional)
  Reference: [v1alpha1Operation](https://sourcey-argocd.pages.dev/api/models/v1alpha1operation/index.md); Type: object

- `spec` (optional)
  Reference: [v1alpha1ApplicationSpec](https://sourcey-argocd.pages.dev/api/models/v1alpha1applicationspec/index.md); Type: object
  
  ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.

- `status` (optional)
  Reference: [v1alpha1ApplicationStatus](https://sourcey-argocd.pages.dev/api/models/v1alpha1applicationstatus/index.md); Type: object

Responses:

- 200: A successful response.

Content type: application/json

Type: object

Schema: [v1alpha1Application](https://sourcey-argocd.pages.dev/api/models/v1alpha1application/index.md)

- `metadata` (optional)
  Reference: [v1ObjectMeta](https://sourcey-argocd.pages.dev/api/models/v1objectmeta/index.md); Type: object
  
  ObjectMeta is metadata that all persisted resources must have, which includes all objects
  users must create.

- `operation` (optional)
  Reference: [v1alpha1Operation](https://sourcey-argocd.pages.dev/api/models/v1alpha1operation/index.md); Type: object

- `spec` (optional)
  Reference: [v1alpha1ApplicationSpec](https://sourcey-argocd.pages.dev/api/models/v1alpha1applicationspec/index.md); Type: object
  
  ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.

- `status` (optional)
  Reference: [v1alpha1ApplicationStatus](https://sourcey-argocd.pages.dev/api/models/v1alpha1applicationstatus/index.md); Type: object

- default: An unexpected error response.

Content type: application/json

Type: object

Schema: [runtimeError](https://sourcey-argocd.pages.dev/api/models/runtimeerror/index.md)

- `code` (optional)
  Type: integer, int32

- `details` (optional)
  Type: array
  
  Items:
    Reference: [protobufAny](https://sourcey-argocd.pages.dev/api/models/protobufany/index.md); Type: object

- `error` (optional)
  Type: string

- `message` (optional)
  Type: string

## Examples

### cURL

```bash
curl -X PUT 'https://argocd.example.com/api/v1/applications/string' \
  -H 'Authorization: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "metadata": {
    "annotations": {},
    "creationTimestamp": "2024-01-15T09:30:00Z",
    "deletionGracePeriodSeconds": 0,
    "deletionTimestamp": "2024-01-15T09:30:00Z",
    "finalizers": [
      "string"
    ],
    "generateName": "string",
    "generation": 0,
    "labels": {},
    "managedFields": [
      {
        "apiVersion": "string",
        "fieldsType": "string",
        "fieldsV1": {
          "Raw": "dGVzdA=="
        },
        "manager": "string",
        "operation": "string",
        "subresource": "string",
        "time": "2024-01-15T09:30:00Z"
      }
    ],
    "name": "string",
    "namespace": "string",
    "ownerReferences": [
      {
        "apiVersion": "string",
        "blockOwnerDeletion": true,
        "controller": true,
        "kind": "string",
        "name": "string",
        "uid": "string"
      }
    ],
    "resourceVersion": "string",
    "selfLink": "string",
    "uid": "string"
  },
  "operation": {
    "info": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "initiatedBy": {
      "automated": true,
      "username": "string"
    },
    "retry": {
      "backoff": {
        "duration": "string",
        "factor": 0,
        "maxDuration": "string"
      },
      "limit": 0,
      "refresh": true
    },
    "sync": {
      "autoHealAttemptsCount": 0,
      "dryRun": true,
      "manifests": [
        "string"
      ],
      "prune": true,
      "resources": [
        {
          "group": "string",
          "kind": "string",
          "name": "string",
          "namespace": "string"
        }
      ],
      "revision": "string",
      "revisions": [
        "string"
      ],
      "syncOptions": [
        "string"
      ],
      "syncStrategy": {
        "apply": {
          "force": true
        },
        "hook": {}
      }
    }
  },
  "spec": {
    "destination": {
      "name": "string",
      "namespace": "string",
      "server": "string"
    },
    "ignoreDifferences": [
      {
        "group": "string",
        "jqPathExpressions": [
          "string"
        ],
        "jsonPointers": [
          "string"
        ],
        "kind": "string",
        "managedFieldsManagers": [
          "string"
        ],
        "name": "string",
        "namespace": "string"
      }
    ],
    "project": "string",
    "revisionHistoryLimit": 0,
    "source": {
      "chart": "string",
      "directory": {
        "disableExtensionFilter": true,
        "exclude": "string",
        "include": "string",
        "jsonnet": {
          "extVars": [
            {
              "code": true,
              "name": "string",
              "value": "string"
            }
          ],
          "libs": [
            "string"
          ]
        },
        "recurse": true
      },
      "helm": {
        "apiVersions": [
          "string"
        ],
        "fileParameters": [
          {
            "name": "string",
            "path": "string"
          }
        ],
        "ignoreMissingValueFiles": true,
        "kubeVersion": "string",
        "namespace": "string",
        "parameters": [
          {
            "forceString": true,
            "name": "string",
            "value": "string"
          }
        ],
        "passCredentials": true,
        "releaseName": "string",
        "skipCrds": true,
        "skipSchemaValidation": true,
        "skipTests": true,
        "valueFiles": [
          "string"
        ],
        "values": "string",
        "valuesObject": {
          "raw": "dGVzdA=="
        },
        "version": "string"
      },
      "kustomize": {
        "apiVersions": [
          "string"
        ],
        "commonAnnotations": {},
        "commonAnnotationsEnvsubst": true,
        "commonLabels": {},
        "components": [
          "string"
        ],
        "forceCommonAnnotations": true,
        "forceCommonLabels": true,
        "ignoreMissingComponents": true,
        "images": [
          "string"
        ],
        "kubeVersion": "string",
        "labelIncludeTemplates": true,
        "labelWithoutSelector": true,
        "namePrefix": "string",
        "nameSuffix": "string",
        "namespace": "string",
        "patches": [
          {
            "options": {},
            "patch": "string",
            "path": "string",
            "target": {
              "annotationSelector": "string",
              "labelSelector": "string",
              "resId": {
                "gvk": {
                  "group": "string",
                  "kind": "string",
                  "version": "string"
                },
                "name": "string",
                "namespace": "string"
              }
            }
          }
        ],
        "replicas": [
          {
            "count": {
              "intVal": 0,
              "strVal": "string",
              "type": 0
            },
            "name": "string"
          }
        ],
        "version": "string"
      },
      "name": "string",
      "path": "string",
      "plugin": {
        "env": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "name": "string",
        "parameters": [
          {
            "array": [
              "string"
            ],
            "map": {},
            "name": "string",
            "string": "string"
          }
        ]
      },
      "ref": "string",
      "repoURL": "string",
      "tagPrefix": "string",
      "targetRevision": "string"
    },
    "sourceHydrator": {
      "drySource": {
        "path": "string",
        "repoURL": "string",
        "targetRevision": "string"
      },
      "hydrateTo": {
        "targetBranch": "string"
      },
      "syncSource": {
        "path": "string",
        "repoURL": "string",
        "targetBranch": "string"
      }
    },
    "syncPolicy": {
      "automated": {
        "allowEmpty": true,
        "enabled": true,
        "prune": true,
        "selfHeal": true
      },
      "managedNamespaceMetadata": {
        "annotations": {},
        "labels": {}
      },
      "syncOptions": [
        "string"
      ]
    }
  },
  "status": {
    "conditions": [
      {
        "lastTransitionTime": "2024-01-15T09:30:00Z",
        "message": "string",
        "type": "string"
      }
    ],
    "controllerNamespace": "string",
    "health": {
      "lastTransitionTime": "2024-01-15T09:30:00Z",
      "message": "string",
      "status": "string"
    },
    "history": [
      {
        "deployStartedAt": "2024-01-15T09:30:00Z",
        "deployedAt": "2024-01-15T09:30:00Z",
        "id": 0,
        "revision": "string",
        "revisions": [
          "string"
        ]
      }
    ],
    "observedAt": "2024-01-15T09:30:00Z",
    "operationState": {
      "finishedAt": "2024-01-15T09:30:00Z",
      "message": "string",
      "phase": "string",
      "retryCount": 0,
      "startedAt": "2024-01-15T09:30:00Z",
      "syncResult": {
        "resources": [
          {
            "group": "string",
            "hookPhase": "string",
            "hookType": "string",
            "images": [
              "string"
            ],
            "kind": "string",
            "message": "string",
            "name": "string",
            "namespace": "string",
            "status": "string",
            "syncPhase": "string",
            "version": "string"
          }
        ],
        "revision": "string",
        "revisions": [
          "string"
        ]
      }
    },
    "reconciledAt": "2024-01-15T09:30:00Z",
    "resourceHealthSource": "string",
    "resources": [
      {
        "group": "string",
        "health": {
          "lastTransitionTime": "2024-01-15T09:30:00Z",
          "message": "string",
          "status": "string"
        },
        "hook": true,
        "kind": "string",
        "name": "string",
        "namespace": "string",
        "requiresDeletionConfirmation": true,
        "requiresPruning": true,
        "status": "string",
        "syncWave": 0,
        "version": "string"
      }
    ],
    "sourceHydrator": {
      "currentOperation": {
        "drySHA": "string",
        "finishedAt": "2024-01-15T09:30:00Z",
        "hydratedSHA": "string",
        "message": "string",
        "phase": "string",
        "startedAt": "2024-01-15T09:30:00Z"
      },
      "lastComparedDryRevision": "string",
      "lastSuccessfulOperation": {
        "drySHA": "string",
        "hydratedSHA": "string"
      }
    },
    "sourceType": "string",
    "sourceTypes": [
      "string"
    ],
    "summary": {
      "externalURLs": [
        "string"
      ],
      "images": [
        "string"
      ],
      "isAppOfApps": true
    },
    "sync": {
      "comparedTo": {},
      "revision": "string",
      "revisions": [
        "string"
      ],
      "status": "string"
    }
  }
}'
```

### JavaScript

```javascript
const body = `{
  "metadata": {
    "annotations": {},
    "creationTimestamp": "2024-01-15T09:30:00Z",
    "deletionGracePeriodSeconds": 0,
    "deletionTimestamp": "2024-01-15T09:30:00Z",
    "finalizers": [
      "string"
    ],
    "generateName": "string",
    "generation": 0,
    "labels": {},
    "managedFields": [
      {
        "apiVersion": "string",
        "fieldsType": "string",
        "fieldsV1": {
          "Raw": "dGVzdA=="
        },
        "manager": "string",
        "operation": "string",
        "subresource": "string",
        "time": "2024-01-15T09:30:00Z"
      }
    ],
    "name": "string",
    "namespace": "string",
    "ownerReferences": [
      {
        "apiVersion": "string",
        "blockOwnerDeletion": true,
        "controller": true,
        "kind": "string",
        "name": "string",
        "uid": "string"
      }
    ],
    "resourceVersion": "string",
    "selfLink": "string",
    "uid": "string"
  },
  "operation": {
    "info": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "initiatedBy": {
      "automated": true,
      "username": "string"
    },
    "retry": {
      "backoff": {
        "duration": "string",
        "factor": 0,
        "maxDuration": "string"
      },
      "limit": 0,
      "refresh": true
    },
    "sync": {
      "autoHealAttemptsCount": 0,
      "dryRun": true,
      "manifests": [
        "string"
      ],
      "prune": true,
      "resources": [
        {
          "group": "string",
          "kind": "string",
          "name": "string",
          "namespace": "string"
        }
      ],
      "revision": "string",
      "revisions": [
        "string"
      ],
      "syncOptions": [
        "string"
      ],
      "syncStrategy": {
        "apply": {
          "force": true
        },
        "hook": {}
      }
    }
  },
  "spec": {
    "destination": {
      "name": "string",
      "namespace": "string",
      "server": "string"
    },
    "ignoreDifferences": [
      {
        "group": "string",
        "jqPathExpressions": [
          "string"
        ],
        "jsonPointers": [
          "string"
        ],
        "kind": "string",
        "managedFieldsManagers": [
          "string"
        ],
        "name": "string",
        "namespace": "string"
      }
    ],
    "project": "string",
    "revisionHistoryLimit": 0,
    "source": {
      "chart": "string",
      "directory": {
        "disableExtensionFilter": true,
        "exclude": "string",
        "include": "string",
        "jsonnet": {
          "extVars": [
            {
              "code": true,
              "name": "string",
              "value": "string"
            }
          ],
          "libs": [
            "string"
          ]
        },
        "recurse": true
      },
      "helm": {
        "apiVersions": [
          "string"
        ],
        "fileParameters": [
          {
            "name": "string",
            "path": "string"
          }
        ],
        "ignoreMissingValueFiles": true,
        "kubeVersion": "string",
        "namespace": "string",
        "parameters": [
          {
            "forceString": true,
            "name": "string",
            "value": "string"
          }
        ],
        "passCredentials": true,
        "releaseName": "string",
        "skipCrds": true,
        "skipSchemaValidation": true,
        "skipTests": true,
        "valueFiles": [
          "string"
        ],
        "values": "string",
        "valuesObject": {
          "raw": "dGVzdA=="
        },
        "version": "string"
      },
      "kustomize": {
        "apiVersions": [
          "string"
        ],
        "commonAnnotations": {},
        "commonAnnotationsEnvsubst": true,
        "commonLabels": {},
        "components": [
          "string"
        ],
        "forceCommonAnnotations": true,
        "forceCommonLabels": true,
        "ignoreMissingComponents": true,
        "images": [
          "string"
        ],
        "kubeVersion": "string",
        "labelIncludeTemplates": true,
        "labelWithoutSelector": true,
        "namePrefix": "string",
        "nameSuffix": "string",
        "namespace": "string",
        "patches": [
          {
            "options": {},
            "patch": "string",
            "path": "string",
            "target": {
              "annotationSelector": "string",
              "labelSelector": "string",
              "resId": {
                "gvk": {
                  "group": "string",
                  "kind": "string",
                  "version": "string"
                },
                "name": "string",
                "namespace": "string"
              }
            }
          }
        ],
        "replicas": [
          {
            "count": {
              "intVal": 0,
              "strVal": "string",
              "type": 0
            },
            "name": "string"
          }
        ],
        "version": "string"
      },
      "name": "string",
      "path": "string",
      "plugin": {
        "env": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "name": "string",
        "parameters": [
          {
            "array": [
              "string"
            ],
            "map": {},
            "name": "string",
            "string": "string"
          }
        ]
      },
      "ref": "string",
      "repoURL": "string",
      "tagPrefix": "string",
      "targetRevision": "string"
    },
    "sourceHydrator": {
      "drySource": {
        "path": "string",
        "repoURL": "string",
        "targetRevision": "string"
      },
      "hydrateTo": {
        "targetBranch": "string"
      },
      "syncSource": {
        "path": "string",
        "repoURL": "string",
        "targetBranch": "string"
      }
    },
    "syncPolicy": {
      "automated": {
        "allowEmpty": true,
        "enabled": true,
        "prune": true,
        "selfHeal": true
      },
      "managedNamespaceMetadata": {
        "annotations": {},
        "labels": {}
      },
      "syncOptions": [
        "string"
      ]
    }
  },
  "status": {
    "conditions": [
      {
        "lastTransitionTime": "2024-01-15T09:30:00Z",
        "message": "string",
        "type": "string"
      }
    ],
    "controllerNamespace": "string",
    "health": {
      "lastTransitionTime": "2024-01-15T09:30:00Z",
      "message": "string",
      "status": "string"
    },
    "history": [
      {
        "deployStartedAt": "2024-01-15T09:30:00Z",
        "deployedAt": "2024-01-15T09:30:00Z",
        "id": 0,
        "revision": "string",
        "revisions": [
          "string"
        ]
      }
    ],
    "observedAt": "2024-01-15T09:30:00Z",
    "operationState": {
      "finishedAt": "2024-01-15T09:30:00Z",
      "message": "string",
      "phase": "string",
      "retryCount": 0,
      "startedAt": "2024-01-15T09:30:00Z",
      "syncResult": {
        "resources": [
          {
            "group": "string",
            "hookPhase": "string",
            "hookType": "string",
            "images": [
              "string"
            ],
            "kind": "string",
            "message": "string",
            "name": "string",
            "namespace": "string",
            "status": "string",
            "syncPhase": "string",
            "version": "string"
          }
        ],
        "revision": "string",
        "revisions": [
          "string"
        ]
      }
    },
    "reconciledAt": "2024-01-15T09:30:00Z",
    "resourceHealthSource": "string",
    "resources": [
      {
        "group": "string",
        "health": {
          "lastTransitionTime": "2024-01-15T09:30:00Z",
          "message": "string",
          "status": "string"
        },
        "hook": true,
        "kind": "string",
        "name": "string",
        "namespace": "string",
        "requiresDeletionConfirmation": true,
        "requiresPruning": true,
        "status": "string",
        "syncWave": 0,
        "version": "string"
      }
    ],
    "sourceHydrator": {
      "currentOperation": {
        "drySHA": "string",
        "finishedAt": "2024-01-15T09:30:00Z",
        "hydratedSHA": "string",
        "message": "string",
        "phase": "string",
        "startedAt": "2024-01-15T09:30:00Z"
      },
      "lastComparedDryRevision": "string",
      "lastSuccessfulOperation": {
        "drySHA": "string",
        "hydratedSHA": "string"
      }
    },
    "sourceType": "string",
    "sourceTypes": [
      "string"
    ],
    "summary": {
      "externalURLs": [
        "string"
      ],
      "images": [
        "string"
      ],
      "isAppOfApps": true
    },
    "sync": {
      "comparedTo": {},
      "revision": "string",
      "revisions": [
        "string"
      ],
      "status": "string"
    }
  }
}`;

const response = await fetch('https://argocd.example.com/api/v1/applications/string', {
  method: 'PUT',
  headers: {
    'Authorization': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "metadata": {
    "annotations": {},
    "creationTimestamp": "2024-01-15T09:30:00Z",
    "deletionGracePeriodSeconds": 0,
    "deletionTimestamp": "2024-01-15T09:30:00Z",
    "finalizers": [
      "string"
    ],
    "generateName": "string",
    "generation": 0,
    "labels": {},
    "managedFields": [
      {
        "apiVersion": "string",
        "fieldsType": "string",
        "fieldsV1": {
          "Raw": "dGVzdA=="
        },
        "manager": "string",
        "operation": "string",
        "subresource": "string",
        "time": "2024-01-15T09:30:00Z"
      }
    ],
    "name": "string",
    "namespace": "string",
    "ownerReferences": [
      {
        "apiVersion": "string",
        "blockOwnerDeletion": true,
        "controller": true,
        "kind": "string",
        "name": "string",
        "uid": "string"
      }
    ],
    "resourceVersion": "string",
    "selfLink": "string",
    "uid": "string"
  },
  "operation": {
    "info": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "initiatedBy": {
      "automated": true,
      "username": "string"
    },
    "retry": {
      "backoff": {
        "duration": "string",
        "factor": 0,
        "maxDuration": "string"
      },
      "limit": 0,
      "refresh": true
    },
    "sync": {
      "autoHealAttemptsCount": 0,
      "dryRun": true,
      "manifests": [
        "string"
      ],
      "prune": true,
      "resources": [
        {
          "group": "string",
          "kind": "string",
          "name": "string",
          "namespace": "string"
        }
      ],
      "revision": "string",
      "revisions": [
        "string"
      ],
      "syncOptions": [
        "string"
      ],
      "syncStrategy": {
        "apply": {
          "force": true
        },
        "hook": {}
      }
    }
  },
  "spec": {
    "destination": {
      "name": "string",
      "namespace": "string",
      "server": "string"
    },
    "ignoreDifferences": [
      {
        "group": "string",
        "jqPathExpressions": [
          "string"
        ],
        "jsonPointers": [
          "string"
        ],
        "kind": "string",
        "managedFieldsManagers": [
          "string"
        ],
        "name": "string",
        "namespace": "string"
      }
    ],
    "project": "string",
    "revisionHistoryLimit": 0,
    "source": {
      "chart": "string",
      "directory": {
        "disableExtensionFilter": true,
        "exclude": "string",
        "include": "string",
        "jsonnet": {
          "extVars": [
            {
              "code": true,
              "name": "string",
              "value": "string"
            }
          ],
          "libs": [
            "string"
          ]
        },
        "recurse": true
      },
      "helm": {
        "apiVersions": [
          "string"
        ],
        "fileParameters": [
          {
            "name": "string",
            "path": "string"
          }
        ],
        "ignoreMissingValueFiles": true,
        "kubeVersion": "string",
        "namespace": "string",
        "parameters": [
          {
            "forceString": true,
            "name": "string",
            "value": "string"
          }
        ],
        "passCredentials": true,
        "releaseName": "string",
        "skipCrds": true,
        "skipSchemaValidation": true,
        "skipTests": true,
        "valueFiles": [
          "string"
        ],
        "values": "string",
        "valuesObject": {
          "raw": "dGVzdA=="
        },
        "version": "string"
      },
      "kustomize": {
        "apiVersions": [
          "string"
        ],
        "commonAnnotations": {},
        "commonAnnotationsEnvsubst": true,
        "commonLabels": {},
        "components": [
          "string"
        ],
        "forceCommonAnnotations": true,
        "forceCommonLabels": true,
        "ignoreMissingComponents": true,
        "images": [
          "string"
        ],
        "kubeVersion": "string",
        "labelIncludeTemplates": true,
        "labelWithoutSelector": true,
        "namePrefix": "string",
        "nameSuffix": "string",
        "namespace": "string",
        "patches": [
          {
            "options": {},
            "patch": "string",
            "path": "string",
            "target": {
              "annotationSelector": "string",
              "labelSelector": "string",
              "resId": {
                "gvk": {
                  "group": "string",
                  "kind": "string",
                  "version": "string"
                },
                "name": "string",
                "namespace": "string"
              }
            }
          }
        ],
        "replicas": [
          {
            "count": {
              "intVal": 0,
              "strVal": "string",
              "type": 0
            },
            "name": "string"
          }
        ],
        "version": "string"
      },
      "name": "string",
      "path": "string",
      "plugin": {
        "env": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "name": "string",
        "parameters": [
          {
            "array": [
              "string"
            ],
            "map": {},
            "name": "string",
            "string": "string"
          }
        ]
      },
      "ref": "string",
      "repoURL": "string",
      "tagPrefix": "string",
      "targetRevision": "string"
    },
    "sourceHydrator": {
      "drySource": {
        "path": "string",
        "repoURL": "string",
        "targetRevision": "string"
      },
      "hydrateTo": {
        "targetBranch": "string"
      },
      "syncSource": {
        "path": "string",
        "repoURL": "string",
        "targetBranch": "string"
      }
    },
    "syncPolicy": {
      "automated": {
        "allowEmpty": true,
        "enabled": true,
        "prune": true,
        "selfHeal": true
      },
      "managedNamespaceMetadata": {
        "annotations": {},
        "labels": {}
      },
      "syncOptions": [
        "string"
      ]
    }
  },
  "status": {
    "conditions": [
      {
        "lastTransitionTime": "2024-01-15T09:30:00Z",
        "message": "string",
        "type": "string"
      }
    ],
    "controllerNamespace": "string",
    "health": {
      "lastTransitionTime": "2024-01-15T09:30:00Z",
      "message": "string",
      "status": "string"
    },
    "history": [
      {
        "deployStartedAt": "2024-01-15T09:30:00Z",
        "deployedAt": "2024-01-15T09:30:00Z",
        "id": 0,
        "revision": "string",
        "revisions": [
          "string"
        ]
      }
    ],
    "observedAt": "2024-01-15T09:30:00Z",
    "operationState": {
      "finishedAt": "2024-01-15T09:30:00Z",
      "message": "string",
      "phase": "string",
      "retryCount": 0,
      "startedAt": "2024-01-15T09:30:00Z",
      "syncResult": {
        "resources": [
          {
            "group": "string",
            "hookPhase": "string",
            "hookType": "string",
            "images": [
              "string"
            ],
            "kind": "string",
            "message": "string",
            "name": "string",
            "namespace": "string",
            "status": "string",
            "syncPhase": "string",
            "version": "string"
          }
        ],
        "revision": "string",
        "revisions": [
          "string"
        ]
      }
    },
    "reconciledAt": "2024-01-15T09:30:00Z",
    "resourceHealthSource": "string",
    "resources": [
      {
        "group": "string",
        "health": {
          "lastTransitionTime": "2024-01-15T09:30:00Z",
          "message": "string",
          "status": "string"
        },
        "hook": true,
        "kind": "string",
        "name": "string",
        "namespace": "string",
        "requiresDeletionConfirmation": true,
        "requiresPruning": true,
        "status": "string",
        "syncWave": 0,
        "version": "string"
      }
    ],
    "sourceHydrator": {
      "currentOperation": {
        "drySHA": "string",
        "finishedAt": "2024-01-15T09:30:00Z",
        "hydratedSHA": "string",
        "message": "string",
        "phase": "string",
        "startedAt": "2024-01-15T09:30:00Z"
      },
      "lastComparedDryRevision": "string",
      "lastSuccessfulOperation": {
        "drySHA": "string",
        "hydratedSHA": "string"
      }
    },
    "sourceType": "string",
    "sourceTypes": [
      "string"
    ],
    "summary": {
      "externalURLs": [
        "string"
      ],
      "images": [
        "string"
      ],
      "isAppOfApps": true
    },
    "sync": {
      "comparedTo": {},
      "revision": "string",
      "revisions": [
        "string"
      ],
      "status": "string"
    }
  }
}'''

response = requests.put(
    'https://argocd.example.com/api/v1/applications/string',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
