import pfx certificate using rest api

I’m trying to import pfx certificate file using the f5 ltm rest api I have tried the command:

curl -sk -u admin: -H "Content-Type: application/json" -X POST https:///mgmt/tm/sys/crypto/pkcs12 -d '{"command":"install","name":"test","from-local-file":"/tmp/file.pfx","passphrase":""}'

I get error : “code”:400,“message”:"Failed to open /tmp/file.pfx “errorStack”:[]

any idea how to import fx certificate using rest api?

Thanks!

when i look at this question and then specially the remark from IanB then it could be there is something wrong with the file you are sending. if you just import it via the GUI, does it work?

does loading seperate files work? so not the full container.