Forum Discussion

HenryX_171845's avatar
HenryX_171845
Icon for Nimbostratus rankNimbostratus
Oct 16, 2014

iControl REST to create (with external file transfer) and update an external data group

Is there an example somewhere?

 

4 Replies

  • Take a look at this question.

     

    I know the title says 'iRule', but iheartF5's answer offers an example of updating an external data group via iControl REST call.

     

  • Robert,

     

    I think that approach works for me, thanks! Do we know if external data group file update like that causes traffic glitch, assuming a same named EDG is used in data path?

     

    • StephanManthey's avatar
      StephanManthey
      Icon for MVP rankMVP
      I just tested iHearF5s solution on TMOS v11.6.0 and it worked seamless as the related tmsh command: i.e. $ tmsh modify sys file data-group external_datagroup_acl { source-path http://10.131.131.52/external_datagroup_acl.class } results in REST API call of: $ curl -sk -u admin:admin -H "Content-Type: application/json" -X PUT \ -d '{"name":"external_datagroup_acl","partition":"Common","source-path":"http://10.131.131.52/classimport/external_datagroup_acl.class"}‘ \ https://localhost/mgmt/tm/sys/file/data-group/~Common~external_datagroup_acl | \ sed -r 's/$/\n/; s/,/,\n/g; s/(\[)/\1\n/g; s/(\])/\n]/g' The changes in the external file were reflected immediately in the LTM data-group for both the tmsh and API approach.