Skip to main content
Scott3
New Member
October 19, 2023
Solved

Delete local cert using FortiGate API

  • October 19, 2023
  • 2 replies
  • 1683 views

Hi,

 

Does anybody know how to delete local certs using the FortiGate API?

 

I found out how to upload them here:

Upload certs using API 

 

But I need to delete the old one first to upload the new one.

 

Thanks

Best answer by bpozdena_FTNT

Hi @Scott3 ,

 

You can use the HTTP DELETE method.

 

Example:

curl -X 'DELETE' 'https://<FortigateIP>:<FortigatePORT>/api/v2/cmdb/vpn.certificate/local/<CERT_NAME>?access_token=<API_TOKEN>'

 

2 replies

bpozdena_FTNT
Staff
Staff
October 20, 2023

Hi @Scott3 ,

 

You can use the HTTP DELETE method.

 

Example:

curl -X 'DELETE' 'https://<FortigateIP>:<FortigatePORT>/api/v2/cmdb/vpn.certificate/local/<CERT_NAME>?access_token=<API_TOKEN>'

 

Scott3
Scott3Author
New Member
October 20, 2023

Thank you

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!