Forum Discussion

ST_Wong's avatar
ST_Wong
Icon for Cirrus rankCirrus
May 10, 2018

Upload external data group file through REST api

Hi, can I upload data group file to overwrite existing one through REST api ? Will use curl to do the work.

 

Would anyone please help? Thanks and Rgds

 

1 Reply

  • Hi, You can put a file to a temporary dir and then put to data-group file.

    e.g.

    curl -k -u admin:admin -H "Content-Type: application/json" -X PUT -d '{"name":"","source-path": "file:///var/tmp/my_newcontent.txt"}' https://192.168.1.246/mgmt/tm/sys/file/data-group/~Common~my_datagroup_file |json-format

    Regards.