Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor

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
Highlighted
Admin
Admin
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.

View solution in original post

0 Kudos
2 Replies
Highlighted
Admin
Admin
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.

View solution in original post

0 Kudos
Highlighted
Contributor
Thank you PhoneBoy, i suspected that...
I'll put the login into the script
0 Kudos