Reply
Highlighted

Create Fixed Address - Web Api java

partha
Techie
Posts: 2
2692     0

Hi 

I was trying to add Create Fixed Address in java 

JSONObject object = new JSONObject();

object.put("ipv4addrs", "{\"ipv4addr\":\"65.246.246.2\",\"mac\":\"aa:bb:cc:11:22:21\"}" );

 

Then in out put i always find "{ "Error": "AdmConProtoError: List value expected for field: ipv4addrs",   "code": "Client.Ibap.Proto",   "text": "List value expected for field: ipv4addrs"}"

 

Help would be appriciated 

 

Thanks in Advance

Partha

Re: Create Fixed Address - Web Api java

Expert
Posts: 81
2693     0

Hello Partha,

 

 I'm not a programming expert, but from the WAPI documentation:

 

ipv4addrs

This is a list of IPv4 Addresses for the host.

Type: A/An record:host_ipv4addr object array.

 

As per my understanding, you must provide an array as parameter.

 

Please see the attached images and check if this information helps you.

 

Regards,

Paulo Costa

 

 

 

Re: Create Fixed Address - Web Api java

Expert
Posts: 81
2693     0

Partha,

 

I found this at https://community.infoblox.com/t5/API-Integration/The-definitive-list-of-REST-examples/m-p/1214#U121...

 

Please check if this solves your problem.

 

Add a HOST

 POST /wapi/v1.2/record:host
 Content-Type: application/json

    { "name":"wapi.test.org",
      "ipv4addrs":[
          {
             "ipv4addr":"1.1.1.21"
          }
        ]
    }

 

Regards,

Paulo Costa

 

Re: Create Fixed Address - Web Api java

partha
Techie
Posts: 2
2693     0

Hi 

Thanks for the reply, i was able to create that 

with the url & Json gven below
https://IP...../wapi/v1.0/record:host 

{"ipv4addrs":[{"configure_for_dhcp": false, "ipv4addr": "65.246.246.2","mac":"54:75:d0:19:4a:3f"}], "name": "some.domanin.com", "configure_for_dns": false}

Showing results for 
Search instead for 
Do you mean 

Recommended for You