Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

How to Add multiple Extensible Attribute

New Member
Posts: 2
1275     0

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

Re: How to Add multiple Extensible Attribute

Superuser
Posts: 38
1276     0

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"
        }
    }
}
Shukran

Re: How to Add multiple Extensible Attribute

Moderator
Moderator
Posts: 293
1276     0

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"
            }
        }
 }'
Showing results for 
Search instead for 
Did you mean: 

Recommended for You