Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

API & Integration


Perl API: can't get() or search() CNAME record

Posts: 2
3995     0
Hello, when I log in into Infoblox Grid Manager I can easily find given CNAME record. Trying to do the same using Perl API I have no luck with error "1003-The specified object was not found". Here is my code: my @CNAMErecords = $session->search( object => "Infoblox:Smiley Very HappyNS::Record::CNAME", name => 'test-cname'); if (@CNAMErecords){ for my $C (@CNAMErecords){ print "CNAME record found: ".$C->canonical()."\n"; } }else{ print "\tNo CNAME records found: ".$session->status_code()."-".$session->status_detail()."\n"; } tried adding view and/or zone to search criteria without any positive results. What am I doing wrong? Thanks.

the issue was resolved by

Posts: 2
3995     0
the issue was resolved by adding appropriate permissions to account the script was using to create $session.


I-Team Employee
Posts: 171
3995     0

thanks for that update, Evgeny!

can you elaborate?

Posts: 6
3995     0

Can you give a few more clues as to what you did?  I am using perl on a Centos 6.6 system.  My session to Infoblox gets connected, then I do:

my @network_array = $session->get(
    object => "Infoblox:Smiley Very HappyHCP::Network" ,
    network => "[my network range here]",
    network_view => "default"
if ( $session->status_code() ) {
    printf("[%d] %s\n", $session->status_code(), $session->status_detail());

I get no error code but Data:Smiley Very Happyumper fails on @network_array and I get the same "[1003] The specified object was not found" error.

I am using an account with super-admin rights.


Re: can you elaborate?

GHorne Community Manager
Community Manager
Posts: 248
3995     0

you should just use a string, not an array in the network field:




network=> "192.168.*"



Showing results for 
Search instead for 
Do you mean 

Recommended for You