XML API request to interface returns Access Error: 404

XML API request to interface returns Access Error: 404

15857
Created On 03/24/19 01:48 AM - Last Modified 08/20/21 20:09 PM


Symptom


XML API request to interface returns "Access Error: 404" when GlobalProtect Portal is configured on that interface.
The example below when running the keygen command from the browser:

curl -k -X GET 'https://192.168.168.168/api/?type=keygen&user=**LOGICMONITOR-USER**&password=**PASSWORD** 
<!DOCTYPE html> 
<html><head><title>Document Error: Not Found</title></head> 
<body><h2>Access Error: 404 -- Not Found</h2> 
<p>Can't locate document: /api/</p> 
</body> 
</html>
 


Environment


  • Palo Alto Firewall (VM or Hardware)
  • PAN-OS 8.0 and above.
  • GlobalProtect Portal configured on the same interface of XML API request.


Cause


XML API requests cannot be sent to an interface that hosts the Global Protect Portal as it is running on the same URL and port (443). 


 


Resolution


If the target interface where the XML API request is sent has Global protect Portal or Gateway enabled, then it will respond to XML API request on port 4443.
The command needs to specify port 4443 to be successful.

Example:
curl -k -X GET 'https://192.168.168.168:4443/api/?type=keygen&user=**LOGICMONITOR-USER**&password=**PASSWORD**

 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000boQ4CAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language