API & Integration

Reply
Highlighted
Accepted Solution

RESTful API call to retrieve all records in a particular dns view/zone

[ Edited ]
Adviser
Posts: 60
17652     0

I've read just about every thread in this section and gone through the API reference guide trying to come up with a solution to retrieve all records in a specified zone in the default dns view.  I'm using the csv_download function.  I have multiple dns views so the query has to specify the default dns view.  I am using the RESTful API and using curl on a linux box.  I don't have access to installing perl so I can't use the existing examples that require the perl API.  Here's what I've pieced together so far.  I'm not getting any errors but there is no data being returned.  

 

/usr/bin/curl \

   --tlsv1 \

   --insecure \

   --user 'username: password' \

   -H "Content-Type: application/json" \

   -X POST https://gm.hostname.com/wapi/v2.3/fileop?_function=csv_export \

   -d '{"_filename": "testfile", "_object": "allrecords", "view": "default", "zone": "example.com"}'

 

I'm getting an empty dataset in return.  Also, the RESTful API documentation states the following:

 

"Exports older than a week are removed automatically from the file area. Additional older exports are also removed automatically to keep the size of the WAPI export file directory under 250 megabytes.

 

This function also supports exporting the CSV file to a named file in a subdirectory called wapi_output in the file distribution area."

 

How can I look at what is in the wapi_output directory?  I don't see any way in the web GUI to see what's on the file system of the gm.  I checked the CLI commands and I don't see any way to list files in the wapi_output directory either.  

 

Re: RESTful API call to retrieve all records in a particular dns view/zone

Moderator BRampling
Moderator
Posts: 69
17653     0

Drop the _filename option and you will get a token and a URL:

curl -k1 -u admin:infoblox -H "Content-Type: appliction/json" -X POST https://10.60.27.4/wapi/v2.5/fileop?_function=csv_export -d '{"_object": "allrecords", "view": "default", "zone": "test.com"}'

{
    "token": "eJylUE1rwzAMvfuPdJc6dvqRdLeOrDAYLbSDwS4isZ1WkNie7ZT2308ebKfddrCR9J7ek6SU83cI\n5szoU87GFCaVXGBesgeFtnfd4G7cWZNfunsTWdOmFo6mZ75kCqCbcEhoAZhGlZhfsAftl+w0MzeP\n4Q4JRzNjfsV2clmLqqylqPlGlGW9YPE0m8JA6Jr4l5R8fCwKKfha8LLiyyKXQCONlqDHwQC6IphP\nQD1vDu/718O2mUshZPFB06kLDjpyFa8kWGVt1BTVJP1XD0GbTNK0DsVSEK+ItHt7NkUa/T/MpfwR\nBmOV02jPuVqSw9PLPoeLX8LodD6PzBdrtm9bOD7vcr5iMR29XOdryorAHg05QHKg3Ojb8N1Vs33e\ns2s9oPVTgqsJEZ3N2Iawjn8BpRWYQw==\n", 
    "url": "https://10.60.27.4/http_direct_file_io/req_id-DOWNLOAD-1001/Zonechilds.csv"
}

Download the file from the URL:

curl -k1 -u admin:infoblox -H "Content-type:applicain/force-download" -O https://10.60.27.4/http_direct_file_io/req_id-DOWNLOAD-1001/Zonechilds.csv

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   908  100   908    0     0   4416      0 --:--:-- --:--:-- --:--:--  4429

Let NIOS know you're done the download:

curl -k1 -u admin:infoblox -H "Content-Type: application/json" -X POST https://10.60.27.4/wapi/v2.5/fileop?_function=downloadcomplete -d '{ "token": "eJylUE1rwzAMvfuPdJc6dvqRdLeOrDAYLbSDwS4isZ1WkNie7ZT2308ebKfddrCR9J7ek6SU83cI\n5szoU87GFCaVXGBesgeFtnfd4G7cWZNfunsTWdOmFo6mZ75kCqCbcEhoAZhGlZhfsAftl+w0MzeP\n4Q4JRzNjfsV2clmLqqylqPlGlGW9YPE0m8JA6Jr4l5R8fCwKKfha8LLiyyKXQCONlqDHwQC6IphP\nQD1vDu/718O2mUshZPFB06kLDjpyFa8kWGVt1BTVJP1XD0GbTNK0DsVSEK+ItHt7NkUa/T/MpfwR\nBmOV02jPuVqSw9PLPoeLX8LodD6PzBdrtm9bOD7vcr5iMR29XOdryorAHg05QHKg3Ojb8N1Vs33e\ns2s9oPVTgqsJEZ3N2Iawjn8BpRWYQw==\n"}'

{}

Now you have a file called Zonechilds.csv that contains all the records in the zone:

header-hostaddress,address*,_new_address,parent*,boot_file,boot_server,broadcast_address,configure_for_dhcp,configure_for_dns,deny_bootp,domain_name,domain_name_servers,ignore_dhcp_param_request_list,lease_time,mac_address,match_option,network_view,next_server,option_logic_filters,pxe_lease_time,pxe_lease_time_enabled,routers,use_for_ea_inheritance,view
header-hostrecord,fqdn*,_new_fqdn,addresses,aliases,cli_credentials,comment,configure_for_dns,_new_configure_for_dns,created_timestamp,creator_member,ddns_protected,disabled,enable_discovery,enable_immediate_discovery,ipv6_addresses,network_view,override_cli_credentials,override_credential,snmpv1v2_credential,snmpv3_credential,ttl,use_snmpv3_credential,view
hostrecord,host.test.com,,1.1.1.1,,,,True,,,,False,False,True,False,,default,False,False,,,,False,default
hostaddress,1.1.1.1,,host.test.com,,,,False,True,,,,,,,,default,,,,,,True,default

A simpler way to do this is just to GET the allrecords object for the zone and parse the output:

curl -k1 -u admin:infoblox -H "Content-Type: application/json" -X GET https://10.60.27.4/wapi/v2.5/allrecords -d '{"view":"default","zone":"test.com"}'

[
    {
        "_ref": "allrecords/ZG5zLnpvbmVfc2VhcmNoX2luZGV4JGRucy5iaW5kX25zJC5fZGVmYXVsdC5jb20udGVzdC4uaW5mb2Jsb3gubG9jYWxkb21haW4:", 
        "comment": "Auto-created by Add Zone", 
        "name": "", 
        "type": "UNSUPPORTED", 
        "view": "default", 
        "zone": "test.com"
    }, 
    {
        "_ref": "allrecords/ZG5zLnpvbmVfc2VhcmNoX2luZGV4JGRucy5iaW5kX3NvYSQuX2RlZmF1bHQuY29tLnRlc3Q:", 
        "comment": "Auto-created by Add Zone", 
        "name": "", 
        "type": "UNSUPPORTED", 
        "view": "default", 
        "zone": "test.com"
    }, 
    {
        "_ref": "allrecords/ZG5zLnpvbmVfc2VhcmNoX2luZGV4JGRucy5ob3N0JC5fZGVmYXVsdC5jb20udGVzdC5ob3N0:host", 
        "comment": "", 
        "name": "host", 
        "type": "record:host_ipv4addr", 
        "view": "default", 
        "zone": "test.com"
    }
]

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

I was so close!  Thank you for pointing out the problem.  

 

I had planned on downloading the CSV file for each affected zone (renaming each file to the zone name) and using sed/awk to search and replace the old DNS view name to the new DNS view name.  Then re-import the zone to the new DNS view.  This weekend I'll take a look at the documentation to see how difficult it would be to perform the same functionality without using CSV files.   For now I plan on using the CSV file method.  The examples you supplied are excellent!

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

I appreciate the direction. I have been trying to make this same thing work for my requirement with is to extract what zones in the external view have a RFC1918 address.

 

It doesn't appear using a wildcard for zone works.

 

Does anyone have an idea how I could tailor this script (or have another one) that would serve that purpose?

 

Desired results would be

DNS View, Zone, Record, IP Address

 

Thank You for any assistance in obtaining this.

Re: RESTful API call to retrieve all records in a particular dns view/zone

[ Edited ]
Adviser
Posts: 60
17653     0

DHosang_1 Don't know if this will help or not but this is what I'm doing:

 

I log in the the grid master and go to Data Management ---> DNS ---> <click on the dns view you want> ---> Export ---> Export data in Infoblox CSV Import Format

 

The downloaded CSV file will contain a complete list of all the zones in that DNS view.  In the CSV file, keep the column that contains the zone name and throw everything else away.  Next, I sort the file and last, I delete the zones I do not want to download CSV files for.  

 

Now I have a sorted list of zone names that I want to download.  I posted a BASH shell script on this forum that accepts a list of zones to download.  It will download all the zone names listed in the file and renames the CSV file to the name of the zone.  I believe my other post is here:

 

https://community.infoblox.com/t5/DNS-DHCP-IPAM/Automate-copying-zones-records-to-a-different-DNS-vi...

 

If this doesn't help let me know.

 

I forgot to address your last comment:

 

"Desired results would be

DNS View, Zone, Record, IP Address"

 

If you absolutely need the results in the format listed above, it would be easy to write a shell script to reformat the output. If you need help with that I can write something up for you.  

Re: RESTful API call to retrieve all records in a particular dns view/zone

[ Edited ]
jason_stevens
Techie
Posts: 1
17653     0

Getting all the records for a zone would be nice!  our infoblox doesn't have v2.5 for some reason, I went down from there, and we have v2.1 ....  So I thought I'd try to get 'something.com' like this:

 

curl -k1 -u "admin:something#" -H "Content-Type: application/json" -X GET https://10.xx.xxx.xxx/wapi/v2.1/allrecords -d '{"view":"External","zone":"something.com"}'

 

{ "Error": "AdmConProtoError: JSON Decoding: No JSON object could be decoded",
"code": "Client.Ibap.Proto.JSONDecoding",
"text": "JSON Decoding: No JSON object could be decoded"
}

Is 2.1 too old? 

---edit

 

Turns out that Windows & curl just don't get along too well.  I re-ran my stuff on a Linux box, and got what I was looking for.

 

Super thanks for the hints on the site to enumate zones, then dump a zone! ...

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

Clark, I've been trying your method but its a bit difficult because of the format I'm trying to get which is

 

View - Zone - Record - IP Address

 

Of course you may want to know why this would be helpful but its mainly because we search for IP's containing RFC1918 in External View and it would show what zone and record that should be looked at as an example.

 

Any help is MOST appreciated on the best way to do this.  Infoblox reporting tools are limited on how many records so I have to use some sort of API method to accomplish this.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

Are you trying to find all DNS records that are using private IP address space?  What I would do is download all the records for every zone in the DNS view.  If you put all the csv files in one directory you can run the grep command against all the files and that will give you a list of all private IP address records including which zone file they are in.

 

This is what I would do:

 

1) Download a list of all the zones in a particular DNS view.

 

2) Using that list, download the zone files for each of those zones.  The zone file will contain all of the DNS records in that zone.

 

3) Put all the zone files in the same directory.

 

4) Run a grep command to find all of the 10 net private addresses.  

Example:  grep ',10.' * | sort > /tmp/all-records-with-10-addresses.txt

 

This grep command will search all the zone files where for the string "10." which would most likely indicate a private IP address.  Since the files are CSV files, the IP address would be preceeded with the , delimiter.  So the grep command would look for a comma followed by 10. and the rest of the IP address would follow.  You could search for 192. also or any of the other private network ranges.  Grep appends the name of the file, which will also be the zone name, to the beginning of the line.  Sort will sort everything by the zone name.  The end result is a text file containing the zone name followed by the DNS record that contains a 10. IP address.

 

I have all of the scripts to do this.  If I did not post them (I can't remember) let me know and I will post them.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

I first want to thank you for your help.  I would appreciate the scripts since I've been struggling with this for awhile now and I think its because I keep making assumptions on how to do it and it doesn't seem to work.  So really scripts for step #2 would be great.

 

Thanks alot

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

It will take me a few hours to get back to my desk to do this.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

What I get when I try to extract the records using the bash script you provided before on NIOS 7.12

 

Processing zone: somedomain.com
<TITLE>Network Error</TITLE>
<big>Network Error (dns_unresolved_hostname)</big>

 

So the assumption is the Linux box I'm using can't resolve what I put in your script under:

# Grid Master
SERVER="gm.example.corp"

 

But if I do a dig for gm.example.corp I get a response so not sure why I get that error since dns is obviously able to resolve hostname.

 

Any ideas?

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

I can help you sort this out.   I have some ideas how to track down the problem.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

Just a heads up... thought I was making progress

It looks like my Linux box was using the http_proxy setting so I added --noproxy '*' like shown below

 

......
# Create CSV file for this zone
$CURL \
--tlsv1 \
--insecure \
--noproxy '*' \
-u "$USERNAME:$PASSWORD" \

.......

 

Now when I try and run the bash script I am getting an output for every zone like this

Processing zone: somedomain.com
Token: eJylUE1rwzAMvfuPtJcmcT7aZLeOrDAYLbSDwS4isZ1WkNie7ZT2308ubKfddrCR9PSepCeEsXdw\n6szoE0b74GYRjGOWs6VAPZh+NLfEaBVfuFvlWduFDo5qYDZnAqCfcQyoAZhEEZgt2FLakp0W6mbR\n3SHgpBbMVmzHy6bixTprqqTK6ppvGuZPi9mNBK+JcAnB+qc05VlSFgkvyyTPqjRWQSKtF2DAUQGa\n1KkvQLlqDx/7t8O2Xa1r3uTpJ60oLjhKnwh/JdFN1EdJUU3yf5IIe2wh6SiKeUaNqScHurNKw2T/\nM57zH2VQWhiJ+hyrOY14ft3HsPhtmIyMLvFoXLt938LxZRfzivlwtHwdTeUbAgdUNAGCAWEm27kH\nq2b7eGnfWUBt5wBX5TwaHbGGsD75BjWMmfE=\n
URL: https://gm.example.corp/http_direct_file_io/req_id-DOWNLOAD-68192/Zonechilds.csv
Filename: somedomain.com.csv
<HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (dns_unresolved_hostname)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your requested host "gm.example.corp" could not be resolved by DNS.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">

</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>

</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

Try using the IP address of the grid master

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

Same result and I even added the GM FQDN and IP to /etc/hosts with no difference

Re: RESTful API call to retrieve all records in a particular dns view/zone

[ Edited ]
Adviser
Posts: 60
17653     0

The problem may be that you are passing a variable to the curl command that has a space in it.  Here is the next step in troubleshooting.   Run the curl command by hand.  Don't use variables, type all the info into the command line by hand.  

 

It would probably be best to open a text editor and cut and paste the curl command into the text editor then replace the variables with the actual values you are using.  For readability, use the \ character to split the command into multiple lines.   After you edit the entire command, cut and paste it into a bash shell window.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

Don't post any of your company's identifiable information

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

I'm hoping I've been keeping the company stuff secret so far

 

$ curl -k --tlsv1 --insecure --noproxy '*' -u "admin:Infoblox" -H "Content-Type: application/json" -X POST "https://gm.example.corp/wapi/v2.3/fileop?_function=csv_export" -d "{\"_object\":\"allrecords\",\"view\":\"External DNS View\",\"zone\":\"somedomain.com\"}" > result.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 610 0 541 100 69 112 14 0:00:04 0:00:04 --:--:-- 142

 

looks like it worked but no somedomain.com.csv exists

 

$ cat result.txt
{
"token": "eJylUMFqwzAMvftH2kuTOnHaZLeOrDAYLbSDwS4isZ1WkNie7Zb27ycXttNuO9hIenpP0pPSujt4\nfWL0SWtC9BcZrWeOs7lEM9h+tLfMGp1evDsdWNvFDg56YK5gEqC/4BjRADCFMjJXsrlygh1n+ubQ\n3yHipGfMVWzLRVNxUYmmyKqyqNdFw8JxdvEjwSsinGN04SnP+TITZcaFyIpllacqKKT1Igw4akCb\ne/0FqBbt/mP3tt+0i1XNG5F/0oryjKMKmQxXEl0nfVQU1ST/J4mwxxaKjqKYL6kxD+RAd9J5nNx/\nxnP+owzaSKvQnFK1oBHPr7sUlr8Nk1XJJZ6MazfvGzi8bFNesRAPjq+SqXxN4ICaJkC0IO3kOv9g\n1WyXLu07B2jcJcJV+4DWJKwhrM++ATl8mfY=\n",
"url": "https://10.11.12.13/http_direct_file_io/req_id-DOWNLOAD-68194/Zonechilds.csv"

Re: RESTful API call to retrieve all records in a particular dns view/zone

[ Edited ]
Adviser
Posts: 60
17653     0

Does your real DNS view name have spaces in it?  Don't tell me what it is, just if it has spaces in it.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

Yes DNS View has spaces in the name of the View

 

I did the next part of the script which was to download the zone.csv and it seemed to work manually

 

Now working on FILENAME rename to make sure that part works

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

OK so I need to edit my bash shell script to handle variables that contain spaces.  That is the problem.  I'm not going to have time to do that today but I can do it tomorrow.  Maybe tonight after work if you need this urgently.  

 

Here are the other scripts I have.  Tell me which ones you want:

 

download-zone-objects.sh

This script gets a list of all the zones in a DNS view.  It only contains the csv data to recreate the empty zones.  It does not  contain the actual DNS records inside each zone.

 

batch-download-zone-records.sh

The script accepts the name of a file that contains a list of zones.  The script will download all the records in each zone that are listed in the file.  

 

Once you get this far, you will have a bunch of csv files containing zone records.   You can edit these records and re-upload (import) them.  I have some scripts that pre-process this zone data.  One thing it does is change the DNS view for the records.  That way when I batch upload them, they go into the new DNS view.   I'm not going to include those scripts becuase they perform functions specific to my situation.   However, I can sanitize some of the scripts to remove my into so you can see how the files can be precessed.

 

upload-csv.sh

This script will upload a SINGLE csv file to the infoblox grid master for importing

 

batch-upload-zone-records.sh

Uploads and imports ALL of the csv files in a specified directory.  The zones have to exist already.  The csv files contain the records in the zones.   The csv files are named the same as the zone name.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

Kinda thinking its something to do with closing the connection.  I tried to match the CURL to whats at the top since that seems to work but it won't work below

 

# Let NIOS know download is complete
$CURL \
# -k1 \
--tlsv1 \
--insecure \
--noproxy '*' \
-u "$USERNAME:$PASSWORD" \
-H "Content-Type: application/json" \
-X POST https://$SERVER/wapi/$VERSION/fileop?_function=downloadcomplete \
-d "{ \"token\": \"$TOKEN\"}"

 

Output with your script configured like above

Processing zone: somedomain1.com
Token: superlongtokenstuffg=\n
URL: https://10.11.12.13/http_direct_file_io/req_id-DOWNLOAD-68205/Zonechilds.csv
Filename: somedomain1.com.csv
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
./clarkextract.sh: line 91: --tlsv1: command not found

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

Going to sound like a greedy goose but I would love to have each of those. I can see where it would help me possibly automate some processes.  If you don't mind that is.

 

Not urgent on this script.. Thank you for your help.  Trying to figure it out on my own just not making progress so your help is much appreciated.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

Nope, the problem is the spaces in your the name of your DNS view.  When you have those spaces in there, curl thinks it's the end of that parameter.  I have to have the BASH shell script escape the spaces.

Re: RESTful API call to retrieve all records in a particular dns view/zone

[ Edited ]
Adviser
Posts: 60
17653     0

The nice thing about scripting this is that you can download the csv file containing all the zone names.  You can then use the shell command "cut" to easily parse out the zone names and pipe them to a file.  Then you can use that file with the script batch-download-zone--records.sh and you will get a bunch of csv files named after the zones.  These files contain all the records for that zone.  

 

You can run other scripts to modify the data.   I have a script - a bash one liner - that changes the DNS view name.  That way when I batch upload the csv files, they all go into the new DNS view.  You can copy records from one view to another in the GUI but if you have 75 zones to copy it starts to get "not practical"

 

And besides, you will go insane clicking on the same sequence of buttons for every copy option.  Maybe fall into a trance.  It's too bad Infoblox doesn't have a batch copy to move data from one view to another.  These scripts solve that.  

 

OK I will work on fixing that shell script so it will account for spaces in a variable name.  I need to go through my scripts before I upload them to make sure I removed any company info.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

It's almost midnight and I'm just looking into this now.  Curl coes not like having spaces in the URL so I was right about that part.  Your DNS view has spaces in the name and that name is part of the URL.  What I need to do is modify my script to check the "DNS View" variable and replace any spaces with %20

 

Not sure how I'm going to format that as I don't know how bash will interpret the % symbol.  I'll have to create a dummy DNS View in my lab environment and give it a name with spaces in it.  I can test this on Friday.  I think I can have this fixed quickly.  I will update tomorrow.

 

 

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

I tried some things in the lab with no luck.   I created a DNS View with spaces in the name and used my script to download some zone records.  I verified that a zone name with no spaces works.  Also verified a zone name with spaces did not work.

 

I tried escaping the spaces in the zone name.  That didn't work.  Also tried replacing the spaces with %20 and that didn't work.  Finally I tried quoting the DNS View variable with double and single quotes and that didn't work.

 

I'm sure this can be done, I just haven't figured out how to do it yet.  I will google search for examples of using curl with a URL that contains spaces.  Still researching.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Authority
Posts: 36
17653     0

Wow! really gave it a good effort.  I really appreciate it.  I ended up changing the DNS View so it doesn't contain spaces and it appears the script works up to the point its suppose to close the connection then it gives the silly error

<HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (dns_unresolved_hostname)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your requested host "gm.example.corp" could not be resolved by DNS.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">

</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>

</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>

 

What's really strange is that it was able to resolve it just fine earlier in the script but now it can't at the end. Puzzling.  I'll keep poking at it. 

 

I looked at a domain.com.csv and it shows this:

<HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (ssl_domain_invalid)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your request contacted a host which presented a certificate with a Common Name that did not match the domain requested.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
This is typically caused by a Web Site presenting an incorrect or invalid certificate, but could be because of a configuration error.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>

</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>

 

Odd since I don't get any errors through the GUI and even with the new Chrome 58 it passes so we know the SAN is good.

Re: RESTful API call to retrieve all records in a particular dns view/zone

Adviser
Posts: 60
17653     0

There's a curl switch you can use that will ignore cert errors. 

Re: RESTful API call to retrieve all records in a particular dns view/zone

[ Edited ]
Authority
Posts: 36
17653     0

yea whenever I run curl I need to run it like:

curl --tlsv1 --insecure --noproxy '*' -u "admin:Infoblox" -H "Content-Type: application/force-download" -O https://gm.example.corp/http_direct_file_io/req_id-DOWNLAOD-68222/Zonechilds.csv"

 

That works..  Now I just have to figure out why it doesn't work in the script when I add those options.

Showing results for 
Search instead for 
Do you mean 

Recommended for You