Forum Discussion

Vladyslaw's avatar
Icon for Nimbostratus rankNimbostratus
Feb 03, 2020

How can I Delete certificate via REST API?


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:

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

  • 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


    From here:


  • 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>