cancel
Showing results for 
Search instead for 
Did you mean: 

How can I Delete certificate via REST API?

Vladyslaw
Nimbostratus
Nimbostratus

Hello,

I created a Client SSL Certificate and now I am trying to delete it from my F5 via REST API,

I tried to use this article: https://clouddocs.f5.com/products/big-iq/mgmt-api/v7.0.0/ApiReferences/bigiq_public_api_ref/r_adc_ss...

 

 

This is the syntax of the command that I am typing:

(this command supose to show me all my certificates, no?)

curl -sk -u admin:Aa123456 -H "Content-Type: application/json" -X GET /mgmt/cm/adc-core/working-config/sys/file/ssl-cert

all I got after executing this command is nothing.

 

Also when I trying to excute this command, I get the same result, nothing happens

curl -sk -u admin:Aa123456 -H "Content-Type: application/json" -X DELETE /mgmt/cm/adc-core/working-config/sys/file/ssl-cert/cert_name

 

 

Please somebody explain to me what I am doing wrong

 

 

 

2 REPLIES 2

Chase_Abbott
F5 Employee
F5 Employee

You know I didn't even pay attention to the above URL where you got the article. That's for the BIG-IQ, our management platform for BIG-IP systems and application templates.

 

Are you trying to get/delete the certificate from BIG-IP or your BIG-IQ install, you specified "F5" so I'm taking a wild guess?

 

This is for BIG-IP: "Content-Type: application/json" -X GET https://xxx.xxx.xxx.xxx/mgmt/tm/sys/crypto/cert

 

From here: https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_sys_crypto_cert.html

 

Greg_Jewett
Cirrus
Cirrus

ASSUMING that BIG-IP; I will answer it as such, as I came across the same need, not knowing the answer. Thank you . I also needed to delete a CSR, KEY and CERT, so the command only changes so slightly.

 

  • DELETE Certificate: https://<f5_ip_address>/mgmt/tm/sys/crypto/cert/<certificate filename>
  • DELETE Private: https://<f5_ip_address>/mgmt/tm/sys/crypto/key/<private key filename>
  • DELETE CSR: https://<f5_ip_address>/mgmt/tm/sys/crypto/csr/<csr filename>