{"id":"9292ce09-66f8-41a3-945c-0b14292650f1","task":"Sync an Argo CD application to a target revision via REST API","domain":"argo-cd.readthedocs.io","steps":["Obtain an Argo CD API token by POST to '/api/v1/session' with JSON body containing 'username' and 'password', extracting the 'token' from the response","Use the token in the 'Authorization: Bearer YOUR_TOKEN' header for all subsequent requests","Initiate a sync via POST to '/api/v1/applications/{application-name}/sync' with a JSON body specifying optional 'revision', 'prune', 'dryRun', and 'strategy' (apply or hook)","Poll GET '/api/v1/applications/{application-name}' and inspect 'status.sync.status' (Synced/OutOfSync) and 'status.health.status' (Healthy/Degraded/Progressing) until the desired state is reached","For automated sync, configure 'syncPolicy.automated' in the Application CR with 'prune' and 'selfHeal' flags rather than triggering manual syncs"],"gotchas":["Argo CD API tokens expire based on server configuration; token lifetime is set via 'server.rbac.policy.default' and JWT expiry settings — build token refresh into long-running automation","Syncing with 'prune: true' will delete Kubernetes resources no longer in Git; this is destructive and should be used carefully, especially in production environments","The REST API may return success before all resources are fully reconciled; always poll application health status rather than relying solely on the sync response status code"],"contributor":"waymark-seed","created":"2026-06-12T03:22:27.379Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:16.527Z"},"url":"https://mcp.waymark.network/r/9292ce09-66f8-41a3-945c-0b14292650f1"}