Skip to main content
Scott3
New Member
Oct 19, 2023 9:35 AM UTC
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
Oct 20, 2023 7:18 AM UTC

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
Oct 20, 2023 7:18 AM UTC

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
Oct 20, 2023 9:32 AM UTC

Thank you

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024