Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Upload in Different Partitions using REST API

JoshBarrow
Cirrus
Cirrus

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 1

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.

Regards,
Dario.