Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

Search extensible attribute for a value

Techie
Posts: 8
1348     0

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": "STATESmiley Very HappyISPLAY"
}
]

 

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?

Re: Search extensible attribute for a value

Superuser
Posts: 65
1348     0

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

Techie
Posts: 8
1348     0

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

Superuser
Posts: 65
1349     0

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

Moderator
Moderator
Posts: 293
1349     0

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

Techie
Posts: 8
1349     0

It wasn't obvius in th documentation. This works just the way I wanted it too. Thank you.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You