Forum Discussion
kleinsmk
Mar 22, 2022Nimbostratus
In case this helps anyone in the future you can simpy just use a GET on one F5 device and then a PUT or PATCH on the device you want to move the datagroup to. I've used powershell and the existing LTM module to leverage sessions but you can do this in any language.
$add = Invoke-RestMethodOverride -Method GET -URI ($F5Session.BaseURL.Replace('/ltm/',"/ltm/data-group/internal/yourrule")) -WebSession $F5Session.WebSession
$add = $add | convertto-json -depth 5
Invoke-RestMethodOverride -Method PATCH -URI ($F5Session.BaseURL.Replace('/ltm/',"/ltm/data-group/internal/yourrule")) -Body $json -ContentType "application/json" -WebSession $F5Session.WebSession