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

JoshBarrow's avatar
Jun 18, 2020

Upload in Different Partitions using REST API

I have a script that I use to upload certs to our LTM with Powershell. I'm wondering if there is an endpoint or something that I can use to upload the cert into a specific partition instead of the default /Common/ Partition?

1 Reply

  • Hello JoshBarrow.

    First you need to upload cert & key files to the BIG-IP. You can do that in many ways. For example:

    https://devcentral.f5.com/s/articles/file-upload-via-icontrol-rest

    After that, you can install them in a specific partition using next commands:

    curl -sk -u admin:<PASS> -H "Content-Type: application/json" -X POST https://x.x.x.x/mgmt/tm/sys/crypto/cert -d '{"command":"install","name":"<CERT_NAME>","partition":"<PARTITION>","from-local-file":"<PATH>/<CERT_FILE>"}'
     
    curl -sk -u admin:<PASS> -H "Content-Type: application/json" -X POST https://x.x.x.x/mgmt/tm/sys/crypto/key -d '{"command":"install","name":"<KEY_NAME>","partition":"<PARTITION>","from-local-file":"<PATH>/<KEY_FILE>"}'

    Regards,

    Dario.