cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Highlighted
Francesco-P
Nickel

Exact match for object lookup in the rulebase

Jump to solution

Hi all,

simple question: Is there any way to search in the rulebase an object by its exact name via api?

When i search an object in the rulebase with its name i.e. "MyName", the output reports also rules with objects like "Old_myname_checkpoint".

Case-insensitve mechanism is not a problem, but in my case i prefer to have an exact match just for the pattern that i'm looking for.

I also tried in ignorant fashion: "^MyName$" 🙂

I think that this could by tied to this note:
"Note - Typing the token name into the search box does not always produce the same results as selecting from the list." as reported in the guide

 

Thanks

0 Kudos
1 Solution

Accepted Solutions
Admin
Admin

Re: Exact match for object lookup in the rulebase

Jump to solution
I don't think the API has a concept of "exact match" for the show objects call.
You could probably pipe the output thru jq to print only the exact match you care about, though.
0 Kudos
2 Replies
Admin
Admin

Re: Exact match for object lookup in the rulebase

Jump to solution
I don't think the API has a concept of "exact match" for the show objects call.
You could probably pipe the output thru jq to print only the exact match you care about, though.
0 Kudos
Francesco-P
Nickel

Re: Exact match for object lookup in the rulebase

Jump to solution
Thank you PhoneBoy, i suspected that...
I'll put the login into the script
0 Kudos