- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Update extensible_attributes over Web API ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-16-2013 06:30 AM
Hello,
How can we Update extensible_attributes over Web API ? I tried all different possibilites,
all of them did not work...
What is the correct syntax for it?
https://X.X.X.X/wapi/v1.1/fixedaddress/_REFID:10.17.26.10/default?extensible_att......
thanks....
Hassan
Not: It would be great if you guys give me a java or c# sample...
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-16-2013 08:25 AM
I am getting this error:
{ "Error": "AdmConProtoError: Unknown argument/field: 'VlanNo'",
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-20-2013 05:15 AM
this one does not work either..
curl -k -u admin:infoblox -H "Content-Type: application/json" -X PUThttps://10.129.32.50/wapi/v1.1/network/##SOMEREF##:10.1.0.0/16/default -d '{"extensible_attributes": {"Site": "somewhere"}}'
constantly saying that "unknown arg. for ext. attr.
Why ????
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-20-2013 06:49 AM
I tried below command and its working for me
curl -k -u admin:infoblox -H "Content-Type: application/json" -X PUT https://1.1.1.20/wapi/v1.1/network/#REF#:10.0.0.0/8/default -d '{"extensible_attributes": {"Site": "somewhere"}}'
Can you provide more info on what you tried ?
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-20-2013 10:09 AM
We are trying to update extensible_attributes of an
FixedAddress object over Web API (v1.1) But we are always
getting error regarding syntax I guess...
curl -k -u admin:infoblox -H "Content-Type: application/json" -X PUT https://1.1.1.20/wapi/v1.1/network/#REF#:10.0.0.0/8/default -d '{"extensible_attributes": {"Site": "somewhere"}}
When we try to send above command, API gives error about ext...attr.
it says "Unknown argument/field.....
Maybe, we are not sending correct json format...
I am not sure...
is this OK ?
-d {"extensible_attributes":{"Site":"TEST"}}
thanks....
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-20-2013 09:23 PM
Can you paste the complete command which you are passing ?
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-20-2013 10:03 PM
here it is...
curl -k -u webapi:XXXXX -X PUT https://Y.Y.Y.Y/wapi/v1.1/fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuMTcuMjYuMTAuMC4u:10.17.26.10/defa... -d {"extensible_attributes" :{"Site" :"TEST"}}
by this, we are targeting an extensible field named "Site".
So, what do you think ?
thanks....
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-20-2013 10:52 PM
I see you are missing content type in your request
-H "Content-Type: application/json". Can you add this and try once ?
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-21-2013 02:22 AM
I already tried that one too...
Content Type is JSON as default as far as I know...
event I declare cont. type, did not change anything...
still getting same error...
........
What else do you advice? thanks
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-21-2013 03:00 AM
Make sure the extensible_attribute is already existing in the appliance and extensible_attribute is case sensitive.
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-21-2013 05:50 AM
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-21-2013 05:53 AM
can you give me an example of CURL ?
to update extensible_attributes without an error..
thanks....
Re: Update extensible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-21-2013 09:23 PM
Below is the CURL example which i was succesfully able to update ext_attr
curl -k -u admin:infoblox -H "Content-Type: application/json" -X PUT https://x.x.x.x/wapi/v1.1/network/ZG5zLm5ldHdvcmskMTAuMC4wLjAvOC8w:10.0.0.0/8/default -d '{"extensible_attributes":{"Site":"TEST"}}'
"network/ZG5zLm5ldHdvcmskMTAuMC4wLjAvOC8w:10.0.0.0/8/default"
Re: Update extensible attributes in WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-07-2015 10:05 AM
I don't seem to get what is listed here to work for me.
Also, if the extensible attribute exists on the object I can update it, however if the extensible attribute doesn't exist previously I am unable to add the extensible field as a part of the update.
Hoping someone else has run across this and has WAPI extensible attribute updates working.
Thanks!
Craig
Re: Update extensible attributes in WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-08-2015 10:07 AM
It appears my problem with inconsistent updates was due to the EA was a list value and I didn't have my value in the list.
Also I think you need to use extattrs instead of extensible_attributes when working in the WAPI interface.
Craig
Re: Update extensible attributes in WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-13-2015 02:01 AM
Hello!
I have tried to use the examples above but with no luck.
curl -k -u admin:infoblox -H "Content-Type: application/json" -X PUT https://1.2.3.4/wapi/v1.4.2/network/ZG5zLm5ldHdvcmskMTAuMS4wLjAvMTYvMA:10.1.0.0/16/default -d '{"extattrs":{"Site":"TEST"}}'
{ "Error": "AdmConProtoError: Invalid value for extattrs: {\"Site\": \"TEST\"}: string indices must be integers",
"code": "Client.Ibap.Proto",
"text": "Invalid value for extattrs: {\"Site\": \"TEST\"}: string indices must be integers"
Does anyone have any suggestions?
Gunnar
Based on those specific
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-13-2015 04:59 AM
Based on those specific errors, the call appears to be correct but it looks like your Site EA requires integers and will not take text. You should check your Grid > Extensible Attribute page for the Site EA and see if someone specified the data type as integer. The system will enforce the data type of it's restricted.
This is a new test appliance
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-13-2015 09:24 AM
This is a new test appliance with default EA attributes and Site(string) is one of them. I have been able to add networks and update comments without any problems. Is the syntax correct?
Re: This is a new test appliance
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-22-2015 02:13 PM
Can you share your findings?
Re: This is a new test appliance
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-09-2016 02:25 PM
I ran into the same problem.
It took some time but it turns out that we now have to be a little more pedantic in the submission:
--data '{"extattrs": {"Site": {"value": "NEWSITE"}}}'
or if you pretty-print the json
{
"extattrs" : {
"Site" : {
"value" : "NEWSITE"
}
}
}