REST - setSyncLeader in device-group
Hi guys,
Need a help with another bit of REST config - bellow is TMSH command to do this
modify cm device-group DEVICE_GROUP_NAME devices modify { DEVICE_NAME { set-sync-leader } }
and I though that "mgmt/tm/cm/device-group/devices" suppose to do this same
However I can't do even GET to this and is returning "Object not found - devices" then I though - well maybe I should specify which device group I want to query so my new REST command looked like bellow
https://x.x.x.x/mgmt/tm/cm/device-group/~Common~device_trust_group/devices
and this returned me my two devices in this group - however there is no option for "setSyncLeader"
I tried POST as well which in my opinion should looks like either
https://x.x.x.x/mgmt/tm/cm/device-group/~Common~device_trust_group/devices/~Common~lb01a.tst.com
with body like
{ "setSyncLeader": true }
or I tried as well option like bellow
https://x.x.x.x/mgmt/tm/cm/device-group/~Common~device_trust_group/devices
with body like bellow
{ "name": "lb01a.tst.com", "setSyncLeader": true }
Both returned : The requested device group device (/Common/device_trust_group /Common/lb01a.tst.com) already exists."
I run out of ideas tbh and any help really appreciated - I can probably run TMSH command but prefer not to
Regards, Marcin
Terse answer.. I am typing on phone traveling..
You woukd not use POST in the device group as you are working with an existing group, not creating one.
I believe you want to use the PATCH verb on the full devicegroup / devices / device URL.