# How to get average respose time(count group by) of api calls

**URL:** https://discuss.elastic.co/t/how-to-get-average-respose-time-count-group-by-of-api-calls/238448
**Category:** Kibana
**Created:** [June 24, 2020, 11:42am UTC](https://discuss.elastic.co/t/how-to-get-average-respose-time-count-group-by-of-api-calls/238448 "2020-06-24T11:42:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![suresh123](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@suresh123](https://discuss.elastic.co/u/suresh123)
#### Post date: [June 24, 2020, 11:42am UTC](https://discuss.elastic.co/t/how-to-get-average-respose-time-count-group-by-of-api-calls/238448/1 "2020-06-24T11:42:10Z")

</div>

Hi Experts,

I am trying to get the average response of group calls

Example:  
/services/term1/us-en/paymentmethod-1  
/services/term1/in-en/paymentmethod-1  
/services/term1/ch-gn/paymentmethod-1

I need to club all of them and make a single call and get the average response of the above calls

What i did  
Metric-\> lines  
y-axis-\>Aggregation-\> Average and field-\>response\_time,  
Buckets, x-axis-\> date histogram, timestamp per minute,  
split-series-\>terms, requesting the api data

I am getting above calls one by one with average response time  
But my requirement is club all the term1 into one call and get the average response time(0.06+0.05+0.09/3) if it is 3 calls and based on calls needs to count.

---

<div class="post-metadata">

### Author: ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)
#### Post date: [June 25, 2020, 1:24am UTC](https://discuss.elastic.co/t/how-to-get-average-respose-time-count-group-by-of-api-calls/238448/2 "2020-06-25T01:24:11Z")

</div>

> split-series-\>terms, requesting the api data

You want an average across all three, correct? Is it possible that this is the part thats putting them into separate buckets?

---

<div class="post-metadata">

### Author: ![suresh123](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@suresh123](https://discuss.elastic.co/u/suresh123)
#### Post date: [June 25, 2020, 6:37am UTC](https://discuss.elastic.co/t/how-to-get-average-respose-time-count-group-by-of-api-calls/238448/3 "2020-06-25T06:37:53Z")

</div>

Is it possible that this is the part thats putting them into separate buckets?

I am not clear, and do not know how to do, can you please explain

---

<div class="post-metadata">

### Author: ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)
#### Post date: [June 25, 2020, 7:25pm UTC](https://discuss.elastic.co/t/how-to-get-average-respose-time-count-group-by-of-api-calls/238448/4 "2020-06-25T19:25:54Z")

</div>

> split-series-\>terms, requesting the api data

I think this part is putting each URL into a separate bucket. If you remove that split series I think you'll see what you want.

And if thats not helpful, please share screenshots of your configuration.

---

<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 23, 2020, 7:26pm UTC](https://discuss.elastic.co/t/how-to-get-average-respose-time-count-group-by-of-api-calls/238448/5 "2020-07-23T19:26:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
