- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-23-2025 08:46 AM
Hello everyone,
I am building a simple playbook in Cortex XSIAM to check whether an endpoint is CONNECTED or DISCONNECTED using an XQL query on the endpoints dataset.
The XQL query works correctly and returns the expected output:
{
"results": [
{
"endpoint_name": "ENDPOINT_089",
"endpoint_status": "DISCONNECTED"
}
],
"status": "SUCCESS"
}
However, in my conditional task I am trying to compare:
endpoint_status == CONNECTED
endpoint_status == DISCONNECTED
Query is "dataset = endpoints
| filter endpoint_name = "${inputs.EndpointName}"
| fields endpoint_name, endpoint_status"
-
I suspect the issue is that I do not know the correct context object name produced by the script xdr-xql-generic-query. I couldn't find the correct path to reference the output of the xdr-xql-generic-query script inside the Conditional task.
What is the correct output object name for xdr-xql-generic-query in Cortex XSIAM so I can reference results[1].results[0].endpoint_status inside the conditional
task?
Thank you!
11-24-2025 09:13 AM
Theres a better and easier way to get this data without burning your Compute Units on XQL queries in playbooks. The Investigation & Response integration from the Cortex Core marketplace pack includes a number of commands and scripts for interacting with your XDR endpoints, specifically the `core-get-endpoints` command, which will return information about your XDR endpoint agents, and the `endpoint` command, which will return information from any endpoint integration you have enabled (XDR, MSFT, CRWD, etc).
12-04-2025 11:03 PM
Hi, yes you’re right but my issue isn’t about the XQL query itself.
The problem is that I cannot find a stable field/object name in the playbook output.
The task output keeps changing: I couldn't find the correct path to reference the output of the xdr-xql-generic-query script inside the Conditional task. it's not about query.
That’s what I’m trying to solve.
Thank you for trying to help, I really appreciate it
12-06-2025 11:09 AM
Which is why I recommended using either of the commands I noted in my first post. Both create consistent results in context.
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!

