# Can't seem to get custom interval to work in URI query

**URL:** <https://discuss.elastic.co/t/cant-seem-to-get-custom-interval-to-work-in-uri-query/25098>\
**Category:** Kibana\
**Created:** [July 7, 2015, 11:51pm UTC](https://discuss.elastic.co/t/cant-seem-to-get-custom-interval-to-work-in-uri-query/25098 "2015-07-07T23:51:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxandkaia](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@maxandkaia](https://discuss.elastic.co/u/maxandkaia)\
**Post date:** [July 7, 2015, 11:51pm UTC](https://discuss.elastic.co/t/cant-seem-to-get-custom-interval-to-work-in-uri-query/25098/1 "2015-07-07T23:51:59Z")

</div>

I'm pretty new to this, so this may def be just pilot error...apologies up front if so...

This feature is documented for regular queries as such:

"aggs" : {  
"articles\_over\_time" : {  
"date\_histogram" : {  
"field" : "date",  
"interval" : "1.5h"  
}  
}  
}

But when I try it from embedded URI query like this:

...  
vis:(aggs:!((id:'1',params:(),schema:metric,type:count),(id:'2',params:(extended\_bounds:(),field:timestamp,interval:15m,min\_doc\_count:1),schema:segment,type:date\_histogram))  
...

It can't parse the URL. Is it not supported, or am I just doing it wrong?

thx!

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [July 9, 2015, 4:26am UTC](https://discuss.elastic.co/t/cant-seem-to-get-custom-interval-to-work-in-uri-query/25098/2 "2015-07-09T04:26:29Z")

</div>

From what I can tell by looking at existing Kibana URLs, custom interval is encoded as follows:  
`
...
vis:(aggs:!((id:'1',params:(),schema:metric,type:count),(id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:auto,min_doc_count:1),schema:segment,type:date_histogram))
...
`

---

<div class="post-metadata">

**Author:** ![maxandkaia](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@maxandkaia](https://discuss.elastic.co/u/maxandkaia)\
**Post date:** [July 9, 2015, 9:46pm UTC](https://discuss.elastic.co/t/cant-seem-to-get-custom-interval-to-work-in-uri-query/25098/3 "2015-07-09T21:46:21Z")

</div>

Hey! Thanks! That works (the auto interval after that makes the buckets bigger than my custom interval, but still... it's way better now...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:16pm UTC](https://discuss.elastic.co/t/cant-seem-to-get-custom-interval-to-work-in-uri-query/25098/4 "2017-07-06T14:16:43Z")

</div>

Closed on July 6, 2017, 2:16pm UTC


