Showing results for 
Search instead for 
Did you mean: 
Level 9
Report Inappropriate Content
Message 1 of 2

Web API Response - Ignore OK:

When I call api, I am receiving OK: followed by the actual response data. How to make the api to return only response and ignore OK:


Request: https://epohost:8443/remote/system.findGroups?searchText=Default&:output=json


[ { "groupId" : 7, "groupPath" : "My Organization\\Customers\\3_Default" } ]

1 Reply

Re: Web API Response - Ignore OK:

This is a proposed work-around...

If the API consistently responds that way, then you could deal with it in code.  For example, assuming apiResult is a variable containing the https API response, and the first row always contains a status message, then perhaps parse it, like so:

var apiStatus = apiResult.split('\n')[0];
var apiJsonResponse = apiResult.split('\n')[1];

Where: apiStatus would contain 'OK:' and apiJsonResponse would contain '[ { "groupId" : 7, "groupPath" : "My Organization\\Customers\\3_Default" } ]'

Others might offer a more permanent solution.  But personally, I prefer querying ePO data directly from SQL.

Worth a mention, I suppose.

More McAfee Tools to Help You

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