PUT /bgp/targets/{id}

Update an existing BMP target. Uses merge semantics: only non-zero/non-empty fields in the request body overwrite the existing values. The enabled field in the request body is ignored by this endpoint โ€” use PUT /bgp/targets/{id}/toggle to change the enabled state. This deliberately prevents a partial PUT that omits enabled from silently disabling the target (a bool zero value is false).

device_id merges too: set it to pre-link the exporter to its device (validated โ€” an unknown device is 400), or send an explicit "" to clear the link. Omitting the field keeps the current link. Normally the engine self-resolves this link at peer-up once the exporter exists as a device; the manual pre-link is for wiring a target before its first session.

Auth: admin, engineer

Request Body: same shape as POST.

history_mode is validated and applied when non-empty. history_prefix_filter merges by presence: an omitted field keeps the existing filter, while an explicit [] clears it (record all prefixes).

Response: 200 OK -- returns the updated target.

Side effect: Publishes osprey.config.bmp_target.updated to NATS, triggering the engine's NextHopResolver to invalidate its BMP target cache.

Errors: 404 if target not found.