https://iem:52311/api/query?relevance=(name of it) of bes fixlets whose (relevance of it as lowercase contains “name of operating system as lowercase contains “win””)
The challenge is making the quotes within the quotes literal and I haven’t found a way to get it to work. Can anyone help?
I think it all has to be in quotes as well to do that, which means it is more like this:
https://iem:52311/api/query?relevance="(name of it) of bes fixlets whose (relevance of it as lowercase contains "name of operating system as lowercase contains "win"")"
Also, you had smart quotes in there, which is another problem entirely. Don’t store things like this in MS Word or similar.
I think the query has to be something like this:
https://iem:52311/api/query?relevance="(name of it) of bes fixlets whose (relevance of it as lowercase contains %22name of operating system as lowercase contains %2522win%2522%22)"
Depending on how you are sending the query, you might have to escape the spaces as well.
It looks like when you pass in a relevance query, it puts quotes around it automatically, but neither of your example worked for me.
source:
(name of it) of bes fixlets whose (relevance of it as lowercase contains “name of operating system as lowercase contains “win””)
output:
<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
<Query Resource="(name of it) of bes fixlets whose (relevance of it as lowercase contains "name of operating system as lowercase contains "win"")">
<Result/>
<Error>The operator "win" is not defined.</Error>
</Query>
</BESAPI>
source with %2522:
(name of it) of bes fixlets whose (relevance of it as lowercase contains %22name of operating system as lowercase contains %2522win%2522%22)"
output:
<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
<Query Resource="(name of it) of bes fixlets whose (relevance of it as lowercase contains "name of operating system as lowercase contains "win"")"">
<Result/>
<Error>The operator "win" is not defined.</Error>
</Query>
</BESAPI>
I think that depends on the method you are using. I don’t know how you are doing this.
If the first part was true that it puts quotes around it automatically, then neither example would work.
Try this:
(name of it) of bes fixlets whose (relevance of it as lowercase contains “name of operating system as lowercase contains %22win%22”)
You should be able to get the Session Relevance query working in the Session Relevance Tester, or Presentation Debugger, or WebReports QnA first, then try to do that same query using the REST API.
Also, generally you should be able to look for Windows in the name of the fixlet to see if it is applicable on Windows machines. You could also use the site if you are looking for items in the Patches for Windows site.
<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
<Query Resource="(name of it) of bes fixlets whose (relevance of it as lowercase contains "name of operating system as lowercase contains "win"")">
<Result/>
<Error>The operator "win" is not defined.</Error>
</Query>
</BESAPI>
https://iem:52311/api/query?relevance=(name of it) of bes fixlets whose (relevance of it as lowercase contains "name of operating system as lowercase contains %252522win%252522")