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

Delete local cert using FortiGate API

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

bpozdena_FTNT
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>'

 

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. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT