Query on REST API for Infoblox
We are using TE-1405-HW-AC with Nios 9.0.3
Infoblox maintains DNS records and IP reservations for servers.
Once the actual servers are decommissioned, we are looking to automate the process of removing the IP reservations and DNS records for the same using REST API.
- We need to know what are the specific methods/functions/query parameters that can be used from the API documentation
- Can these details be fetched using hostname or IP or would there be any ID, which needs to be retrieved and used in subsequent requests.
- The entries needs to be validated to confirm if the mappings exists for the same and then be removed and logged.
- Is it possible to remove the associations and park the config for sometime prior to deletion?
- Does Infoblox support token based authentication
Answers
-
Please review the WAPI documentation on your infoblox device.
Everything you asked can be answered from the docs.
0 -
Hi Jensen,
Thanks. I reviewed most of the details.
A few questions though:
We are currently on:
TE-1405-HW-AC
Infoblox version: NIOS 9.0.3- I understand the deleted objects are stored in Recycle Bin and it can only display last 15 objects. Could you help confirm how many days / how many records can the recycle bin hold? can it be configured for retention as we wish?
- I understand the WAPI supports only basic auth and session based auth at the moment. Is there any other secure authentication methods? Does it support Token based authentication?
0 -
Hi Ryan,
Thanks. I tested as mentioned below.
I believe the ibapauth cookie is a session based auth and not token based. Could you help point me to some examples for this.
- Verify IP Reservation
curl -k -u admin:infoblox "https://<mgmt-ip>/wapi/v2.10/fixedaddress?ipv4addr=172.1.1.20&_return_fields=ipv4addr,name,mac"
{
"_ref": "fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuMS4xLjIwLjAuLg:172.1.1.20/default",
"ipv4addr": "172.1.1.20",
"mac": "12:34:56:78:91:23",
"name": "server20.example.com"
}- Remove IP Reservation
curl -k -u admin:infoblox -X DELETE "https://<mgmt-ip>/wapi/v2.10/fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuMS4xLjIwLjAuLg:172.1.1.20/default"
- Fetch the DNS Records (using IP or hostname)
curl -k -u "admin:infoblox" -X GET "https://<mgmt-ip/wapi/v2.10/record:a?ipv4addr=172.1.10.20
{
"_ref": "record:a/ZG5zLmJpbmRfYSQuX2RlZmF1bHQub3JnLmV4YW1wbGUsZXgyMGFyZWMsMTAuMS4xMC4yMA:server20arec.example.org/default",
"ipv4addr": "172.1.10.20",
"name": "server20arec.example.org",
"view": "default"
}curl -k -u admin:infoblox -X GET "https://<mgmt-ip>/wapi/v2.10/record:a?name=server20arec.example.org&_return_fields=name,ipv4addr"
{
"_ref": "record:a/ZG5zLmJpbmRfYSQuX2RlZmF1bHQub3JnLmV4YW1wbGUsZXgyMGFyZWMsMTAuMS4xMC4yMA:server20arec.example.org/default",
"ipv4addr": "172.1.10.20",
"name": "server20arec.example.org"
}- Remove the DNS Record
# curl -k -u admin:infoblox -X DELETE "https://<mgmt-ip>/wapi/v2.10/ record:a/ZG5zLmJpbmRfYSQuX2RlZmF1bHQub3JnLmV4YW1wbGUsZXgyMGFyZWMsMTAuMS4xMCyMA:server20arec.example.org/default"
0
Categories
- All Categories
- 5.1K Forums
- 4.6K Critical Network Services
- 465 Security
- Visibility and Insights
- Ideas Portal
- Webinars & Events
- 264 Resources
- 264 News & Announcements
- Knowledge Base Articles
- Infoblox Documentation Portal
- Infoblox Blog
- Support Portal
- 7 Members Hub
- 4 Getting Started with Community
- 3 Community Support