- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
TTL
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-09-2014 12:34 AM
Hello
Hope someone can set me off in the right direction...
Without any problems i can change a host TTL from (within WAPI Rest call) inherit to a value in seconds '{"ttl": 28800 ]}' , but i can't find how to change it back to inherit.
When inherit is enabled and i do a query i see the value "0" but when i use "0" value it's 0 seconds. Sure it's no problem to set it to default 8 hours. I tried the "undef" but that is nog accepted by infoblox.
Help ?
Null or Undefined?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-09-2014 06:29 AM
1.11 XML Format
<X null=”true”/> Field X with value null/None.
I don't see the Null format for JSON. Also, did you try "null" or "undefined"?
Good luck,
Brad
Null or Undefined
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-13-2014 12:00 AM
Hi Brad,
Thanks, but i tried those, i also tried "undef" but even that is a nogo.
Everytime i get a "The remote server returned an error: (400) Bad Request". only when i define a number it's working as it should be.
Maybe there is another place where i have to set ttl inherit = true ?
Bart
Re: Null or Undefined
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-05-2016 12:23 PM
I have also run into this problem. I was wondering if you had figured it out.
Re: Null or Undefined
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-06-2016 10:52 PM
I finally figured out how to solve this problem. Pass use_ttl and have it set to False.
Re: Null or Undefined
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-08-2018 09:38 PM
Hi imperalix,
Can you provide the exact syntax to change the ttl of a host record?
hostdata = {'ipv4addrs':[{'ipv4addr':dripaddress}],'name':host, 'ttl':ttl, 'use_ttl':'True'}
# Perform the POST operation to create the record, data to be supplied in JSON format
addRecord = session.post(hostaddurl, data=json.dumps(hostdata))
. I am trying as above, getting a 'Bad Request' response
Re: Null or Undefined
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-08-2018 10:30 PM
Hi Thiyagu,
You can create a host record with a modified TTL as shown below
curl -k -u admin:infoblox -H 'Content-Type:application/json' -X POST "https://grid-master/wapi/v2.7/record:host" -d '{"name":"host1.demo.com","ipv4addrs":[{"ipv4addr":"1.1.1.110"}],"use_ttl":true,"ttl":3600}'
Hope this works for you,
Krishna Vasudevan
Re: TTL
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-23-2018 10:21 AM
Hi,
I am trying to update TTL of an existing host entry.
curl -k -u foo:bar -H 'content-type: application/json' -X PUT "https://hostwapi/v2.7/record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQudGVzdC5zdHJhdk8ndGVzdHNhaTEyMy4xOTIuMTY4LjUwLjYu:192.168.10.10/test.host.test/default" -d '{"ttl":60}'
But, it's throwing an error saying "unknown argument/field: 'ttl'". Could some one help.
Re: TTL
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-23-2018 07:29 PM
The TTL belongs to the host object, it does not belong to the host address sub-object.
Re: TTL
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-04-2019 03:57 PM
Wondering if this is related to the above. I am trying to "reset" ttl on the host object to "undef" after having set it to a valid value via the REST api in version 2.6.1. The REST api does not accept any value other than a "valid" unsigned integer value. Any non-integer value results in a validation error from the REST api. Such as: "Error": "AdmConProtoError: Invalid value for ttl: \"\": Must be integer type". The REST api does allow the 'use_ttl' field to be reset to 'False', but doing so does NOT remove the 'ttl' value. It remains set to an unsigned integer value and can be queried.
Anyone know of a way to reset the 'ttl' field value to 'empty' after it is set to a valid value? We have used the PERL API in the past and that API seems to allow this type of operation...