Reply
Accepted Solution

WAPI and EA add/update

Authority
Posts: 18
4751     0

Hoi Community

 

I need some help to update my extenssable attributes

 

https://1.1.1.1/wapi/v2.7/ipv4address/Li5pcHY0X2FkZHJlc3MkMTQ1LjIyMS4zNi4xLzA:10.22.56.2/--data  {"extattrs":{"ThisAttribute":"nicevaluemustbe here add"}}

 

What do i do wrong until --data  is what get back the _ref code, but after that how  to format the  to compleeet to update the attribbutes i test this with postman

 

 

https://1.1.1.1/wapi/v2.7/ipv4address/Li5pcHY0X2FkZHJlc3MkMTQ1LjIyMS4zNi4xLzA:10.22.56.2/..............?

 

Hoop some can help me

 

Chris

Re: WAPI and EA add/update

Adviser
Posts: 96
4751     0

First GET user Object _ref
    
        curl -k -u admin:infoblox -H "Content-Type: application/json" -X GET https://192.168.0.110/wapi/v2.2/adminuser?name=myuser
    
    Use _ref to update the ExtAttr:
    
        curl -k -u admin:infoblox -H "Content-Type: application/json" -X PUT https://192.168.0.110/wapi/v2.2/adminuser/b25lLmFkbWluJG15dXNlcg:myuser -d '{"extattrs": { "Site": { "value": "Munich"}} }'

Re: WAPI and EA add/update

Authority
Posts: 18
4751     0

Thanks for your replay

 

https://bla.bla.com/wapi/v2.7/ipv4address/Li5pcHY0X2FkZHJlc3MkMTQ1LjIyMS4zNi4xLzA:10.22.36.1 -d {"extattrs+":{"URL":{"value":"nice.domain.com"}}}

 

I use PUT in postman to check if this is working

 

i get the following errpor Back in the postman body

 

{
"Error": "AdmConProtoError: PUT requires indata, none given",
"code": "Client.Ibap.Proto",
"text": "PUT requires indata, none given"
}

 

i did query the ref in my scrpt on forhand

 

 

Thanks

 

Re: WAPI and EA add/update

Adviser
Posts: 96
4751     0

EAs must be applied to an object, such as a host record or fixed address.  They cannot be applied directly to an IP address.

Re: WAPI and EA add/update

[ Edited ]
Authority
Posts: 18
4751     0

Oke clear, Thanks for this answer

 

Chris

Highlighted

Re: WAPI and EA add/update

Authority
Posts: 18
4751     0

Richard

 

Still struggeling to solve this issue,  I must make python script to add/update EA for ip adress. I must t say iam newbie in scripting and WAPI.

 

I have list of ip adress (container) where i must fill/update the EA. Some ip adresses are empty but still need to update the EA. Purely administration.

 

So which "get" must i do and than what "put" to get the EA updated. Any help is appriciated

 

 

Chrsi

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You