Need data action to get the current # of active calls

I'm needing to find the total number of calls coming in our trunk. I see many posts for using the /api/v2/telephony/providers/edges/trunks/metrics but I'm not getting any data. We have virtual edges with several trunks but there is 1 trunk in particular I'm wanting to check calls on. From what I can see, I can't just use my trunk ID to make the query. I need to query a list of trunk ID's returned from each of the edges? When I try to query, I'm receiving back a 200 ok but no data. Just brackets [ ].

Has anyone done this that could walk me through what I'm missing?

/api/v2/telephony/providers/edges/trunks (get the list of trunks from the edge or edge group)
/api/v2/telephony/providers/edges/trunks/metrics (query the trunk ID list recieved above to see inbound / outbound on each)

I've reviewed this one but still not putting something together correctly - :frowning:

Thanks in advance.
Rob

I got this working. I had to remove a few variables from Postman that were messing up my testing. For anyone else, here's a few notes that helped me.
I'm interested in getting total inbound and outbound calls currently in our environment. Inbound and outbound metrics are available per edge, per trunk. Each edge has it's own trunk ID for the trunk you are wanting to check. Do not use the actual Trunk ID to find metrics.

  1. Use https://api.{{environment}}/api/v2/telephony/providers/edges/:edgeId/trunks with each edge ID to find the trunk ID for the name of the trunk you are wanting to view.
  2. Use https://api.{{environment}}/api/v2/telephony/providers/edges/trunks/metrics?trunkIds= (with a list of comma seperated trunk ID's) to find the calls on each one and add them together for total count.

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