THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

Error getting the cname record in a zone updated

[ Edited ]
Techie
Posts: 11
2596     0

I could get/delete via postman, but not update (put) a cname record.  I got the following error.  I tried in curl, also the same issue. The object_reference variable has the object reference ID, which I got from the get request of the new.abc record.

 

Appreciate any prompt feedback/insight, the sooner the better please.

 

new.abc = old cname

new1.abc = new cname

 

"Error": "AdmConDataError: ...: Cannot fetch object of index type .com.infoblox.dns.zone_search_index."

 

image.png

 

image.png

image.png

Re: Error getting the cname record in a zone updated

Moderator
Moderator
Posts: 315
2596     0

Be sure to tell it you're sending JSON data, otherwise it expects plain text key/value pairs.

 

Under the headers section, include:

"Content-Type" = "application/json"

 

Without it, I got the same errors you saw.  With it, I was able to send successfully.

 

content-type.png

Re: Error getting the cname record in a zone updated

Techie
Posts: 11
2597     0

Thanks MRichard.  I do have json setting in the header already.  Any other thought?

 

So, in the body, I specify the new cname (ie, new1.abc), but in the WAPI url request, I specify the old cname (new.abc in my case) right?  I have the documentation, but it isn't as clear.

 

image.png

Re: Error getting the cname record in a zone updated

Techie
Posts: 11
2597     0

I got it working.  Apparently, these 2 get requests give different object references.  The 2nd one gives the right object reference.  Shouldn't they give the same obj reference?

 

h t t p s://{{grid_master}}/wapi/v2.7/allrecords?zone=abc

h t t p s://{{grid_master}}/wapi/v2.7/record:cname

 

image.pngimage.png

Re: Error getting the cname record in a zone updated

Moderator
Moderator
Posts: 315
2597     0

Yeah, it's rather annoying but the responses from an allrecords search are synthetic search results, not the acual object.

 

From the docs:

allrecords : AllRecords object.

The allrecords object is a read-only synthetic object used to retrieve records that belong to a particular zone.

Since this is a synthetic object, it supports reading only by specifying search parameters, not by reference.

 

if you want the actual object ref from an allrecords search you can ask for the "record" field to be added to the response:

 

wapi/v2.7/allrecords?zone=example.com&_return_fields%2b=record

 

and the response will loook like this:

 

    {
        "_ref": "allrecords/ZG5zLnpvbmVfc2VhcmNoX2luZGV4JGRucy5iaW5kX2NuYW1lJC5fZGVmYXVsdC5uZXR3b3JrLnJpY2hhcmQuY25hbWU:cname", 
        "comment": "", 
        "name": "cname", 
        "record": {
            "_ref": "record:cname/ZG5zLmJpbmRfY25hbWUkLl9kZWZhdWx0Lm5ldHdvcmsucmljaGFyZC5jbmFtZQ:cname.example.com/Internal%20DNS", 
            "canonical": "target.example.com", 
            "name": "cname.example.com", 
            "view": "Internal DNS"
        }, 
        "type": "record:cname", 
        "view": "Internal DNS", 
        "zone": "example.com"
    }, 

Re: Error getting the cname record in a zone updated

Techie
Posts: 11
2597     0

That helps!  Thanks MRichard.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You