Select Page

If you want to automate tasks in Infoblox DDI, the Infoblox WAPI provides an easy way. This guide will provide examples of using the Infoblox DDI API to perform everyday tasks, such as creating DNS zones, records, and DHCP scopes. If you want to automate and streamline your network infrastructure, keep following this site for a BRAND new series.

Introduction to Infoblox DDI API

Infoblox DDI WAPI is an extension of the Infoblox DDI solution that provides a RESTful API interface for interacting with the Infoblox DDI system. The Infoblox DDI WAPI allows you to perform various tasks, such as configuring DNS zones and records, managing DHCP scopes and leases, and managing IP addresses.

Example 1: Creating a DNS Zone

To create a DNS zone using the Infoblox DDI API, you can use the following curl command:

curl -k -u admin:infoblox -H 'Content-Type: application/json' -X POST \
'https://infoblox.example.com/wapi/v2.7/zone_auth' \
-d '{"fqdn": "example.com", "view": "default"}'

We’re creating a DNS zone for “example.com” with the default view in this example.

Example 2: Creating a DNS Record

To create a DNS record using the Infoblox DDI API, you can use the following curl command:

curl -k -u admin:infoblox -H 'Content-Type: application/json' -X POST \
'https://infoblox.example.com/wapi/v2.7/record:host' \
-d '{"name": "www", "zone": "example.com", "view": "default", "ipv4addr": "192.168.1.1"}'

In this example, we’re creating a DNS record for “www.example.com” with the default view and an IP address of “192.168.1.1”.

Example 3: Creating a DHCP Scope

To create a DHCP scope using the Infoblox DDI API, you can use the following curl command:

curl -k -u admin:infoblox -H 'Content-Type: application/json' -X POST \
'https://infoblox.example.com/wapi/v2.7/network' \
-d '{"network": "192.168.1.0/24", "network_view": "default", "comment": "Test DHCP Scope"}'

In this example, we’re creating a DHCP scope for the network “192.168.1.0/24” with the default network view and a comment of “Test DHCP Scope”

Example 4: Updating a DNS Record

To update a DNS record using the Infoblox DDI API, you can use the following curl command:

curl -k -u admin:infoblox -H 'Content-Type: application/json' -X PUT \
'https://infoblox.example.com/wapi/v2.7/record:a/ZG5zLnJlY29yZC5hbmRyb2lkLmNvbSxlbXBsb3llZS5jb20:www.example.com/default' \
-d '{"ipv4addr": "192.168.1.2"}'

In this example, we’re updating the IP address of the “www” record for the “example.com” zone in the default view to “192.168.1.2”.

Example 5: Deleting a DHCP Lease

To delete a DHCP lease using the Infoblox DDI API, you can use the following curl command:

curl -k -u admin:infoblox -H 'Content-Type: application/json' -X DELETE \
'https://infoblox.example.com/wapi/v2.7/lease/ZG5zLm1ldGhvZC5jb20kMTkyLjE2OC4xLjEjMDE6Mjg6MTQsMDAwMA' \

In this example, we’re deleting the DHCP lease for the IP address “192.168.1.14”.

Conclusion

In conclusion, the Infoblox DDI WAPI provides a powerful way to manage network resources and automate tasks. By leveraging the API, network administrators can save time and improve efficiency by automating routine tasks, such as creating DNS records, adding DHCP reservations, and updating network configurations.

In this guide, we’ve covered some basic examples of how to use the Infoblox DDI API with curl commands. We’ve seen how to create and delete DNS records, add DHCP reservations, and more. But these examples are just the beginning.

There are countless ways to use the Infoblox DDI API to automate network management tasks, and the possibilities are limited only by your imagination. With the right tools and knowledge, you can use the API to streamline network operations, reduce errors, and save time.

So if you want to take your network management to the next level, consider exploring the Infoblox DDI WAPI further. With some experimentation and creativity, you may find new and exciting ways to improve your network operations and better serve your organization’s needs.