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

Delete local cert using FortiGate API

  • October 19, 2023
  • 1 reply
  • 1657 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>'

 

1 reply

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