cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

How to query ePO API and get assignment path by agent GUID?

How to query ePO API and get assignment path by agent GUID?

1 Reply
rrodrig1 McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 2

Re: How to query ePO API and get assignment path by agent GUID?

You may have already found the solution, but just for everyone else, here is a solution I came up with.

First, I tried using various remote commands via ePO API (system.find for example), but there wasn't an option for Agent GUID. This option does not work for this scenario..

Secondly, the epo command for system.findGroups did not provide the full assignment path of the group. It only returns the last group (e.g., returns Windows instead of My Organization\Servers\Windows). This option also does not work for this scenario.

Finally, I logged into the ePO console and attempted to create a query that I could call via persistent query API, however, the query filter doesn't allow me to choose Agent GUID as an option - it's not even there. Still, this option doesn't work for this scenario.

In the end, I was forced to learn how to write an s-expression, which allowed me to query the ePO database using language similar to SQL. Here is what worked for me.

https://localhost:8443/remote/core.executeQuery?target=EPOLeafNode&:output=terse&select=(select EPOLeafNode.AgentGUID EPOBranchNode.NodeTextPath2)&where=(eq EPOLeafNode.AgentGUID "6172805E-CB3D-11E8-1DD0-080027ED3369")&order=(order(desc EPOLeafNode.AgentGUID))

 

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community