Created on
‎07-15-2025
10:05 PM
Edited on
‎07-30-2025
01:31 AM
By
Anthony_E
| Description | This article describes how to generate a CSR, download the CSR, get it signed and import back to FortiManager/FortiAnalyzer using API. |
| Scope | FortiManager, FortiAnalyzer. |
| Solution |
POST: https://{{host}}/cgi-bin/module/flatui_proxy
{ "method": "post", "url": "/gui/sys/certificate/generate", "params": { "gen_name": "{{CERT_NAME}}", "id_type": 1, "gen_subject": "{{CERT_SUBJECT}}", "gen_unit": ["{{OU}}"], "gen_org": "{{ORG}}", "gen_city": "{{CITY}}", "gen_state": "{{STATE}}", "gen_country": "{{COUNTRY}}", "gen_email": "{{EMAIL}}", "gen_subj_alt_name": "", "key_type": 1, "gen_size": 2048, "curve_name": "secp256r1", "enroll_method": 0, "gen_url": "", "challenge_password": "" } }
{ "method": "get", "params": [ { "url": "/cli/global/system/certificate/local/{{CERT_NAME}}", "option": [ "get certinfo" ] } ], "id": "1" }
{ "method": "download", "url": "/gui/sys/certificate/local/entry", "params": { "key": "{{CERT_NAME}}" } }
POST: https://{{host}}/flatui/api/gui/system/certification/local
| Key | Value | Type | | ------------------- | ------------------- | ---- | | cert_name | {{CERT_NAME}} | Text | | cert_key_name | (leave empty) | Text | | password | (leave empty) | Text | | csrfmiddlewaretoken | {{csrf_token}} | Text | | csrf_token | {{csrf_token}} | Text | | filepath | Select Cert file | File |
Related documents: Certificates - FortiAnalyzer Admin Guide Technical Tip: Using FortiManager API Technical Tip: Certificate Generation with FIPS Enabled on FortiAnalyzer and FortiGate |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.