THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

GET /range?_return_fields=extattrs returns an empty extattrs object

Superuser
Posts: 17
3342     0

Hello everyone!

 

I'm making an API GET request against the /range object, specifying extattrs in the _return_fields parameter, but get an empty extattrs object back. I have verified that extensible attributes exist and I can see them through the GUI.

 

Any idea what I am doing wrong? Thank you!

 

Request:

 

/wapi/v2.10.5/range?_return_fields=comment,network,network_view,start_addr,end_addr,dhcp_utilization,dhcp_utilization_status,dynamic_hosts,static_hosts,total_hosts,extattrs

Return:


[
    {
        "_ref": "range/ZG5zLmRfdfdfd2UkMTcyLjMxLjY3LjEvMTcyLjMxLjY3LjEyNC8vLzAv:10.31.67.1/10.31.67.124/default",
        "comment": "Template: IP_Phones",
        "dhcp_utilization": 145,
        "dhcp_utilization_status": "NORMAL",
        "dynamic_hosts": 18,
        "end_addr": "10.31.67.124",
        "extattrs": {},
        "network": "10.31.67.0/25",
        "network_view": "default",
        "start_addr": "10.31.67.1",
        "static_hosts": 0,
        "total_hosts": 124
    }
]

Re: GET /range?_return_fields=extattrs returns an empty extattrs object

Superuser
Posts: 38
3342     0

Hello,

The API call looks good and should return the extensible attributes if any.

If the range EA is inherited form the network, make sure the Inheritance State is set to "inherited" or "overridden" and not "Not Inherited".

Shukran

Re: GET /range?_return_fields=extattrs returns an empty extattrs object

Superuser
Posts: 17
3342     0

Thank you for your response. When I look in the GUI, I see the Extensible Attributes on these objects set with an Inheritance State of "Disabled" and "Required" set to "Yes".

So it appears these attributes were specifically set on this object. Shouldn't that even be more reason for these attributes to be returned?

Re: GET /range?_return_fields=extattrs returns an empty extattrs object

Superuser
Posts: 17
3343     0

Just wanted to post a follow-up.

 

I could never get the extattrs to work on the /range object, but I was able to retrieve these via the /network object. Unfortunately, the /network object does not know about the DHCP properties, like start_addr, end_addr, dhcp_utilization etc.

 

So best I could come up with is by retrieving all /range objects and all /network objects, and essentially enriching the /range result set with data from /network for those DHCP ranges. Not ideal, but probably the most efficient way to do this considering this issue.

 

If anyone has any better recommendations, I'd still be very interested in hearing them.

 

Thanks everyone!

Showing results for 
Search instead for 
Did you mean: 

Recommended for You