- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to Add multiple Extensible Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2023 05:57 AM
I am using the InfoBlox API to add a given extensible attribute:value to a specific network obect, although I don't seem to be able to add new ones as everytime I try to do that, I always overwrite the current one. Basically I am not quite sure if the API requires an array of attribute:value all the time or If I am allowed to add an attribute one bye one
Solved! Go to Solution.
Re: How to Add multiple Extensible Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 07:09 AM
Hi ravig,
Each time you are setting/updating extensible attributes you need to pass all the attributes you need to set via API together.
For setting multiple attributes you can use the below format.
{ "extattrs": { "Country": { "value": "UK" }, "Region": { "value": "EMEA" } } }
Re: How to Add multiple Extensible Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023 10:25 AM
Some fields, including the extattrs field, allow for the "+" and "-" modifiers to add or remove individual values.
Adding a Site value to existing values
curl -k -u admin:infoblox -X PUT 'https://192.168.1.2/wapi/v2.11/network/ZG5zLm5ldHdvcmskMTkyLjE2OC4yNy4wLzI0LzA:192.168.27.0/24/default' \ -H "Content-Type: application/json" -d \ '{ "extattrs+": { "Site": { "value": "Honolulu" } } }'
Adding a "State" value:
curl -k -u admin:infoblox -X PUT 'https://192.168.1.2/wapi/v2.11/network/ZG5zLm5ldHdvcmskMTkyLjE2OC4yNy4wLzI0LzA:192.168.27.0/24/default' \ -H "Content-Type: application/json" -d \ '{ "extattrs+": { "State": { "value": "HI" } } }'
Removing a "State" value:
curl -k -u admin:infoblox -X PUT 'https://192.168.1.2/wapi/v2.11/network/ZG5zLm5ldHdvcmskMTkyLjE2OC4yNy4wLzI0LzA:192.168.27.0/24/default' \ -H "Content-Type: application/json" -d \ '{ "extattrs-": { "State": { "value": "HI" } } }'