Prerequisites
- A Cortex XDR user who can create API keys. Palo Alto lets administrators give a key any role, and other users only a role they already hold.
- The Admin role in your CloudThinker workspace, which can add and edit connections. See Roles.
Setup
Create an API key
- Security Level: Advanced. It hashes the key with a random nonce and a timestamp, which blocks replayed requests. Standard also works.
- Role: Viewer for read-only access. For incident changes, pick a role that can triage cases, such as Investigator. See Required permissions.
- Comment: optional, for example
CloudThinker. - Enable Expiration Date: optional. Cortex XDR warns you in the Notification Center one week and one day before the key expires.
Copy the key ID and the API URL
https://api- followed by your tenant’s FQDN, with no path.Add the connection in CloudThinker
Cortex XDR connected; the key reads <number> incidents. and the connection shows Connected.Connection details
Required permissions
The key can do exactly what its role allows.Agent capabilities
Verify the connection
Example prompts
1234 with an incident ID from Cortex XDR.
Troubleshooting
The accordion titles below are the exact messages CloudThinker shows when the connection test fails.Cortex XDR rejected the API key. Check the key ID and the key, and that the key has not expired.
Cortex XDR rejected the API key. Check the key ID and the key, and that the key has not expired.
This is a Standard key. Edit the connection and set Key security level to Standard.
This is a Standard key. Edit the connection and set Key security level to Standard.
The API key works, but its role cannot read incidents. Give the key the Viewer role or higher.
The API key works, but its role cannot read incidents. Give the key the Viewer role or higher.
That is the console address. Use the API URL from Settings > Configurations > API Keys > Copy API URL; it starts with https://api-.
That is the console address. Use the API URL from Settings > Configurations > API Keys > Copy API URL; it starts with https://api-.
https://api-.That address answered, but not as the Cortex XDR API. Use the API URL, which starts with https://api-.
That address answered, but not as the Cortex XDR API. Use the API URL, which starts with https://api-.
Cortex XDR answered with a redirect. Use the exact API URL, with no path.This Cortex XDR tenant has no license for the public API.
This Cortex XDR tenant has no license for the public API.
Cortex XDR is rate-limiting this key. Try again in a minute.
Cortex XDR is rate-limiting this key. Try again in a minute.
An agent says the Cortex XDR write tool is off on this connection
An agent says the Cortex XDR write tool is off on this connection
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Use an Advanced key with an expiration date. An Advanced key blocks replayed requests, and an expiration date limits how long a leaked key works.
- Use a dedicated key. Create the key only for CloudThinker, so you can revoke it without affecting other integrations.
- Key stays on your API address. CloudThinker sends the key only to the API URL you enter and never follows a redirect elsewhere.