- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-16-2025 05:13 AM
Hello,
I am currently trying to code a Script with Cortex API in order to check the version of the latest available Agent. I am talking the precise agent version not like 5.X but the 5.X.XXXX.
I haven't seen anything in their actual documentation, perhaps I missed something.
Hope someone can help me out
Thanks a lot!
10-20-2025 05:24 AM
Should be possible with this API: https://cortex-panw.stoplight.io/docs/cortex-xdr/30237841cb254-get-distribution-version
import requests
def get_cortex_distribution_version(tenant_name, tenant_region, api_key_id, api_key):
url = f"https://api-{tenant_name}.xdr.{tenant_region}.paloaltonetworks.com/public_api/v1/distributions/get_versions"
headers = {
"x-xdr-auth-id": api_key_id,
"Authorization": api_key
}
response = requests.post(url, headers=headers, json={"request_data": {}})
return response.json()
10-20-2025 05:24 AM
Should be possible with this API: https://cortex-panw.stoplight.io/docs/cortex-xdr/30237841cb254-get-distribution-version
import requests
def get_cortex_distribution_version(tenant_name, tenant_region, api_key_id, api_key):
url = f"https://api-{tenant_name}.xdr.{tenant_region}.paloaltonetworks.com/public_api/v1/distributions/get_versions"
headers = {
"x-xdr-auth-id": api_key_id,
"Authorization": api_key
}
response = requests.post(url, headers=headers, json={"request_data": {}})
return response.json()
10-22-2025 06:43 AM
Thanks a lot!
I totally missed it. you saved me
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

