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 Examples

Reply

how to specify network_view in object body requests?

New Member
Posts: 1
1067     1

I'm trying to get data from WAPI using object body requests, but fail to specify network view

 

Examples using object body requests — Infoblox WAPI 2.11.2 documentation (illinois.edu)

https://my_ip/wapi/v2.11.2/request

 

I tried putting network_view in to data part or args part, but no luck, it either gives error argument not supported or 

 

[
    {
        "method""GET",
        "object""extensibleattributedef",
        "data": {
            "name~""ea_",
            "network_view""testing"
        },
        "args": {
            "_return_fields""name",
            "_return_as_object"1
        }
    }
]
 
errors
 
{
    "Error""AdmConProtoError: Unknown argument/field: 'network_view'",
    "code""Client.Ibap.Proto",
    "text""Unknown argument/field: 'network_view'"
}
 
or 
 
{
    "Error""AdmConProtoError: The following argument(s) are unknown or not supported for multiple object body requests: set([u'network_view'])",
    "code""Client.Ibap.Proto",
    "text""The following argument(s) are unknown or not supported for multiple object body requests: set([u'network_view'])"
}
 
How to specify network_view ni object body requests? I have more than just the default view

Re: how to specify network_view in object body requests?

Superuser
Posts: 65
1067     1

The object type extensibleattributedef does not have a network view attribute. EAs are not specific to a network view.

 

For objects that do fall under specific network views, adding the argument under data is correct. For example, this would be used to find an IP in a network in the mycorp network view:

[
  {
    "method": "GET",
    "object": "network",
    "data": 
    {
      "network_view": "mycorp",
      "*Site": "HQ",
      "*Building": "Two"
    },
    "assign_state": 
    {
      "netw_ref": "_ref"
    },
    "discard": true
  },
  {
    "method": "POST",
    "object": "##STATE:netw_ref:##",
    "args": 
    {
      "_function": "next_available_ip"
    },
    "enable_substitution": true
  }
]
Showing results for 
Search instead for 
Did you mean: 

Recommended for You