REST API Relevance Query Help to get Action item

Could some one help me with following issue

I am able to get all scripts of actions using below url

relevance=(names of applicable computers of it,id of it,name of it,source severity of it,scripts of actions of it) of bes fixlets whose (name of site of it contains “Patches” )

As our fixlets are having multiple actions ,above query is returning multiple results

But my requirement is to get only actionscript which is having “text/x-uri”

so in the above screen shot i want to get ‘http://www.ubuntu.com/usn/USN-2265-1/’. I have used below query but its failing with 'Requested resource does not exist.

Could some one help me in correcting below query

relevance=(names of applicable computers of it,name of site of it,id of it,name of it,source severity of it,scripts of actions of it whose (script type of it = “text/x-uri”)) of bes fixlets whose (name of site of it contains “Patches” )

I think you were quite close! The ‘whose’ element must come immediately after the object you want to filter:

(names of applicable computers of it,name of site of it,id of it,name of it,source severity of it | "n/a", scripts of actions whose (script type of it = "text/x-uri") of it) of bes fixlets whose (name of site of it contains "Patches")

Hi @Aram Thanks for the reply . I have used the query given by you but again i ended up with ’ Requested resource does not exist’

Could you please tell if i am doing something wrong

Can you validate the URL encoding of the session relevance statement? The following works for me:

/api/query?relevance=(names%20of%20applicable%20computers%20of%20it%2Cname%20of%20site%20of%20it%2Cid%20of%20it%2Cname%20of%20it%2Csource%20severity%20of%20it%20%7C%20"n%2Fa"%2C%20scripts%20of%20actions%20whose%20(script%20type%20of%20it%20%3D%20"text%2Fx-uri")%20of%20it)%20of%20bes%20fixlets%20whose%20(name%20of%20site%20of%20it%20contains%20"Patches")

1 Like

@Aram

when i use above the latest query given by you its working and when i use following (which i have modified in the latest query given by you) then also its working

relevance=(names of applicable computers of it,name of site of it,id of it,name of it,source severity of it | “n%2Fa”, scripts of actions whose (script type of it = “text%2Fx-uri”) of it) of bes fixlets whose (name of site of it contains “Patches”)

but when i use
relevance=(names of applicable computers of it,name of site of it,id of it,name of it,source severity of it | “n/a”, scripts of actions whose (script type of it = “text/x-uri”) of it) of bes fixlets whose (name of site of it contains “Patches”)

its failing when i use “/” in “n/a” and “text/x-uri” . If i use “%2F” in place of “/” its working fine

And Thank you so much for the solution @Aram, it helped me a lot

1 Like