For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

GeneUWG_150657's avatar
GeneUWG_150657
Icon for Nimbostratus rankNimbostratus
Jun 26, 2016

Get and Replace a Data Group

I have created a data group under

System ›› File Management ›› Data Group File List
and would now like to be able to update it remotely. We are keeping the master copy of the list in a local GitLab server so, ideally, I want to send a webhook to a management box, process it, get the current version from the LTM to keep as a backup, and then send the updated list to my LTM. It seems that I should be able to do this via cURL and the iControl REST api but I can't seem to get it. The farthest I have gotten is this:

$ curl -sk -u $u:$p https://ltm.example.com/mgmt/tm/ltm/dataGroup/external/my-datagroup | sed 's/,/\'$'\n/g'
{"kind":"tm:ltm:data-group:external:externalstate"
"name":"my-datagroup"
"fullPath":"my-datagroup"
"generation":1
"selfLink":"https://localhost/mgmt/tm/ltm/data-group/external/my-datagroup?ver=12.1.0"
"externalFileName":"/Common/my-datagroup"
"externalFileNameReference":{"link":"https://localhost/mgmt/tm/sys/file/data-group/~Common~my-datagroup?ver=12.1.0"}
"type":"string"}

Any advise would greatly appreciated.

1 Reply

  • Hello do you really need an external file ? with the REST api you could just update an internal data-group.