- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Search extensible attribute for a value
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 01:38 PM
I have record:cname and record:host records with extensible attrtibutes of "Technical Owner" and "Business Owner". I am trying to search one of these extensible attributesd for a specific value.
I am using the body-only request of:
[
{
"method": "GET",
"object": "record:cname",
"args": {"_return_fields+": "extattrs"},
"data": {
"*Technical Owner":"*"
}
},
{
"method": "GET",
"object": "record:host",
"args": {"_return_fields+": "extattrs"},
"data": {
"*Technical Owner":"*Gary"
}
},
{
"method": "STATEISPLAY"
}
]
Nothing is returned, yet I know there are 2 record:host types with teh extensible attribute with value containing Gary. What am I doing wrong?
Solved! Go to Solution.
Re: Search extensible attribute for a value
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 03:40 PM
You need to remove the * in your values. So, body should look like this:
[ { "method": "GET", "object": "record:host", "data": { "*Custom EA": "Sample" }, "args": {} }, { "method": "GET", "object": "record:cname", "data": { "*Custom EA": "Sample" }, "args": {} } ]
Re: Search extensible attribute for a value
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 07:42 AM
Thank you for the response, that worked. Is there anyway to use regex in searching a value? Thanks.
Re: Search extensible attribute for a value
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 09:09 AM
I believe that you can. I am not able to try it out right now, but search regex in the WAPI documents, available through the link below, and you should find what you are looking for. If you figure it out, post here. I'd love to see it!
https://docs.infoblox.com/space/NIOS/35400616/NIOS
Re: Search extensible attribute for a value
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 04:13 AM
Use the tilde character to indicate a regex. For example, to match anything that begins with "Sampl", including Sample, Samples and Sampling, use this:
[ { "method": "GET", "object": "record:host", "data": { "*Custom EA~": "Sampl." }, "args": {} }, { "method": "GET", "object": "record:cname", "data": { "*Custom EA~": "Sampl." }, "args": {} } ]
Re: Search extensible attribute for a value
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 06:17 AM
It wasn't obvius in th documentation. This works just the way I wanted it too. Thank you.