- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
12-13-2024 12:55 PM
Hi,
I'm trying to query the Cortex REST API using this doc - https://live.paloaltonetworks.com/t5/cortex-xdr-articles/cortex-xdr-and-xsiam-postman-api-collection... but I keep receiving a
12-14-2024 03:22 PM
Try starting with something simple: standard API key token with relevant permissions and its ID.
In powershell a simple working query can look like:
$api_key_id = ""
$api_key = ""
$headers=@{}
$headers.Add("x-xdr-auth-id", $api_key_id)
$headers.Add("Authorization", $api_key)
$headers.Add("Accept", "application/json")
$response = Invoke-WebRequest -Uri 'https://api-<your_tenanant>.xdr.<your_region>.paloaltonetworks.com/public_api/v1/healthcheck' -Method GET -Headers $headers -ErrorVariable ProcessError
$response
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!