1. You can't supress it. I'm not sure what you mean about the other ad-hod queries -- are you using the python client or straight curl? If you're using the python client, it's handled internally. If you're hitting the server with curl or some other command line/language you'll need to strip that line yourself. If you've got tail available, you can do this automatically with a tail -n+2. e.g. curl -qks -u <name>:<pass> 'https://server:8443/remote/core.help' | tail -n+2
2. I'm not sure which headers you mean, unless you're pulling it in terse mode (adding a :output=terse) on the command line. If you expect to consume the data with a program, you probably want either xml or json output, so use :output=xml or :output=json.
3. There are a few (a very few) command whose success basically means "we've successfully kicked off the process". You'd have to either wait longer than the expected completion time, or use another command to determine whether the command is completed (e.g. using repository.findPackage might work for your use case), or simply loop and sleep until the error condition goes away or you reach a max # of retries.
I'm using curl. Unfortunately, I can't use the Python client, as this functionality will eventually be built into existing C++ software; and the customer machines on which the software will be run do not have Python installed.
I believe you have answered my first question--there is no option to suppress the "OK:" message--I must strip that out myself.
For the second question, a good example is the following command to list the IP addresses of all Windows computers:
core.executeQuery?target=EPOComputerProperties&select=(select (distinct) EPOComputerProperties.IPAddress)&where=(where(contains EPOComputerProperties.OSType "Windows"))&order=(order(asc EPOComputerProperties.IPAddress))&:output=terse
That query will return something similar to the following:
The headers to which I am referring in the second question are the "IP Address" and "------------" lines just below the "OK:" message. In other words, is there any way to get a query to just return the DATA? It sounds to me like the answer is no--the :output parameter should be set to XML or JSON and those formats processed instead. I believe that answers my second question.
In regard to the third question, thank you for the idea about using repository.findPackage in this scenario. I believe that answers my third question.
If I might make a suggestion, it would be that McAfee make a decision if the "OK:" message means that the operation has been completed, or simply that the process has been kicked off, and do that consistently for all commands. Knowing when an operation has completed seems to be more useful to me; but I have also seen cases where an API offers both a synchronous (I'll wait) and asynchronous (Kick off the process and let me continue) option. Perhaps McAfee would consider adding a parameter to these command giving the choice of synchronous or asynchronous operation. At the very least, if the behavior differs from command to command, please consider documenting that in help for the command.