: Submit a Local File to WildFire (API)
Focus
Focus

Submit a Local File to WildFire (API)

Table of Contents

Submit a Local File to WildFire (API)

The WildFire API lets you submit a local supported file type for WildFire analysis. Use this resource automate the submission of new files, such as when using a VPN service.
Ensure that you submit a valid file type when you submit a local file because uploads are limited by WildFire API Access Control.

Resource

/submit/file/

Request Parameters

Use the following form parameters when you submit a local file for WildFire analysis:
Parameters
Description
Example
apikey
(Required for API key authentication) API key
Example:
apikey=<API KEY>
Authorization
(Required for token-based authentication) HTTP request header for token-based authentication. To obtain an access token, create a WildFire API token in Strata Cloud Manager, then generate an access token from the authentication service.
Example:
-H "Authorization: Bearer <ACCESS_TOKEN>"
agent
(Required for Prisma Access and Prisma Cloud Compute-based WildFire public API keys) Designates the API key type
Example:
agent=pcc
Options include:
  • pcc—for use with Prisma Cloud Compute-based WildFire public API keys
  • prismaaccessapi—for use with Prisma Access-based WildFire public API keys
file
(Required) Local path to file
Example:
file=@c:\pdf.pdf

Example Request

Make a POST request to the /submit/file resource and include the local file. Authenticate using one of the following methods:
  • API key authentication—Pass the API key as a form field:
    curl -F 'apikey=<API KEY>' -F 'file=@c:\pdf.pdf' 'https://wildfire.paloaltonetworks.com/publicapi/submit/file'
  • Token-based authentication—Pass a Bearer token in the Authorization header:
    curl -F 'file=@c:\pdf.pdf' -H 'Authorization: Bearer <ACCESS_TOKEN>' 'https://wildfire.paloaltonetworks.com/publicapi/submit/file'
The XML response contains the original filename along with the SHA256 and MD5 hash:
<wildfire> <upload-file-info> <url></url> <filetype>Adobe PDF document</filetype> <filename>pdf.pdf</filename> <sha256>ebb031c3945e884e695dbc63c52a5efcd075375046c49729980073585ee13c52</sha256> <md5>8bd6509aba6eafe623392995b08c7047</md5> <size>433994</size> </upload-file-info> </wildfire>