Forum Discussion

PURI_337727's avatar
PURI_337727
Icon for Nimbostratus rankNimbostratus
Oct 27, 2017

How to overwrite iFileFile with iControlREST

I have uploaded files to F5 with iControlRest using "/mgmt/shared/file-transfer/uploads/" first and then "/mgmt/tm/sys/file/ifile" and now I want to overwrite them. The first method lets overwrite the file but the second one ("/mgmt/tm/sys/file/ifile") don't. I have tried with PUT but the response is "Operation is not supported on component /sys/file/ifile". Could you tell me how I can overwrite this?

 

2 Replies

  • Hello Puri,

    You can achieve this using the following command :

    To create the ifile use:

    curl -sk -u admin:admin -H "Content-Type: application/json" -X POST https://x.x.x.x/mgmt/tm/sys/file/ifile -d '{"name":"ifile_name","source-path":"file:/path/of/file"}'

    To update the ifile use:

    curl -sk -u admin:admin -H "Content-Type: application/json" -X PUT https://x.x.x.x/mgmt/tm/sys/file/ifile/ifile_name -d '{"source-path":"file:/path/of/newFile"}'

    Please let me know if it works for you.

    I've already tested in my lab.

    Waiting for your update.

    Regards