Skip to main content
Flexible Top Header

Hello,

We are migrating our "legacy" v1 API scripts for BAM 9.6.1 to v2 API.

In one of those tools, we use v1 "POST /Services/REST/v1/assignNextAvailableIP4Address" to look for a free static IP address. This endpoint provides parameter 'excludeDHCPRange=false' to easily avoid assigning static IP addresses from DHCP Ranges.

To achieve the same outcome in v2 API, we should use v2 "POST /api/v2/networks/{collectionId}/addresses" with the 'x-bcn-excluded-addresses' header.
But that header is not a Boolean but a list of IPRanges.

We're thinking on populating that 'x-bcn-excluded-addresses' header with the output of another API call to "GET /api/v2/networks/{collectionId}/ranges".

But even this approach is pretty straight-forward, it feels we are over complicating the process.

Are we missing something? Is there any easier way to achieve in v2 API the same behaviour from v1 'excludeDHCPRange=false' ?

Thank you very much.

As far as I know, there’s not a simpler way to do this.  Perhaps ​@bshorland  can confirm.


Thanks ​@tmaestas for your answer.

I have created a RFE through Care.


Reply