: Export Technical Support Data
Focus
Focus

Export Technical Support Data

Table of Contents

Export Technical Support Data

Debug log data sizes are large, so the API uses an asynchronous job scheduling approach to retrieve technical support data. Learn more about Asynchronous and Synchronous Requests to the PAN-OS XML API. The values for the action parameter are:
  • action=<null>—When an action parameter is not specified, the system creates a new job to retrieve tech support data. The initial query creates a job ID that you can then use to check on the status of the job, retrieve results, or delete the job.
  • action=status—Check the status of the job. This returns an XML response with a status element; when the status text data is FIN the job is completed and the tech support file can be retrieved. Example:
curl -X POST 'https://firewall/api?type=export&category=tech-support&action=status&job-id=299"
  • action=get—Retrieve the tech support file as an attachment. The response contains a application/octet-stream content-type and a content-disposition header with a suggested filename; for example:
Content-Type: application/octet-stream Content-Length: 19658186 Content-Description: File Transfer Content-Transfer-Encoding: binary Content-Disposition: attachment; filename=techsupport-8469.tgz
  • action=finish—Stop an active job.
  1. Create a job to retrieve technical support data.
    Use the following request:
    curl -X POST 'https://firewall/api?type=export&category=tech-support"
    The response includes a job ID:
    <response status="success"code="19"> <result> <msg> <line>Exec job enqueued with jobid 2</line> </msg> <job>2</job> </result></response>
  2. Check on the status of the job.
    Use the job ID returned in the previous response as the job-id parameter:
    curl -X POST 'https://firewall/api?type=export&category=tech-support&action=status&job-id=id"
    A status value of FIN indicates the data is ready to be retrieved.
    <response status="success"> <result> <job> <tenq>2012/06/14 10:11:09</tenq> <id>2</id> <user/> <type>Exec</type> <status>FIN</status> <stoppable>no</stoppable> <result>0K</result> <tfin>10:12:39</tfin> <progress>10:12:39</progress> <details/> <warnings/> <resultfile>//tmp/techsupport.tgz</resultfile> </job> </result> </response>
  3. Retrieve the tech support data.
    curl -X POST 'https://firewall/api?type=export&category=tech-support&action=get&job-id=id"
    When using cURL, you can specify the output file name as an option to cURL (-o). After a successful retrieval of the job data, the job is automatically deleted by the system.
  4. ( Optional) Stop the active job in case of error.
    If there is an error or issue with the export job, it may not complete. In cases like this, stop the active job:
    curl -X POST 'https://firewall/api?type=export&category=tech-support&action=finish&job-id=id"
    The response includes a success message:
    <response status"success">   <msg>Job 2 removed.</msg> </response>