Import Files (API)
Focus
Focus
Next-Generation Firewall

Import Files (API)

Table of Contents

Import Files (API)

You can import certain types of files, including as software, content, licenses, and configurations into the firewall using thetype=import parameter in the API request.
Usetype=import and specify the category to import these types of files:
  • Software—category=software
  • Content—category=<anti-virus | content | url-database | signed-url-database>
  • Licenses—category=license
  • Configuration—category=configuration
  • Certificates/key—category=<certificate | high-availability-key | key-pair>
  • Response pages—category=<application-block-page | captive-portal-text | file-block-continue-page | file-block-page | global-protect-portal-custom-help-page | global-protect-portal-custom-login-page | global-protect-portal-custom-welcome-page | ssl-cert-status-page | ssl-optout-text | url-block-page | url-coach-text | virus-block-page>
  • Clients—category=global-protect-client
  • Custom logo—category=custom-logo
    Use cURL to import files to the firewall.

Examples

Import using cURL:
curl --form file=@ <filename> “https://firewall/api/?key=apikey&t<query-parameters>”
Import files to a firewall via Panorama. First import the file to Panorama, then run a request batch upload-install op command:
curl -X GET "http://<panorama>/api/?key=apikey&type=op&cmd=<request><batch><anti-virus><upload-install><uploaded-file><your-file-name-here></uploaded-file><devices><serialnumber></devices></upload-install></anti-virus></batch></request>"
Import a certificate or key by specifying the type of the certificate or key file using thecategory parameter.
  • category=certificate
  • category=keypair
  • category=high-availability-key
(category=certificate orcategory=keypair only) Specify these additional parameters for the certificate file and keypair imports:
  • certificate-name—name of the certificate object on the firewall
  • format—certificate format,pkcs12 orpem
  • passphrase—required when including the certificate key
  • vsys—virtual system where the certificate object is used. Ignore this parameter if the certificate is a shared object.
curl -X POST 'https://firewall/api?type=import&category=certificate&certificate-name=<certificate_name>&format=pkcs12 | pem&passphrase=text&vsys=<vsys>"