mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 00:51:28 +02:00
Declarative API clients (the Terraform provider, scripted PUTs) could not manage a single agent-network field without clobbering server-side state, and had no way to bootstrap an account without creating a provider first. The settings PUT now applies a partial update: every request field is optional and omitted fields keep their stored values. A request carrying a cluster bootstraps the per-account settings row when none exists, so settings-first setups no longer depend on the first provider create; on a bootstrapped account a differing cluster is rejected as a validation error instead of being silently ignored. The GET now returns the 404 the OpenAPI spec always documented instead of 200 with a JSON null body. The provider PUT handler overlays the request onto the stored row, so the nil-gated request fields (extra_values, metadata_disabled, enabled, skip_tls_verification, identity headers, and now models) actually preserve persisted values instead of resetting them through a fresh struct. Identity headers are always present in provider responses so an explicitly cleared header round-trips as an empty string rather than vanishing.