Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Number of calls per Edge?

    Posted 06-05-2025 18:17

    Micael_Ebbmar | 2020-06-24 08:34:38 UTC | #1

    Hi,

    I'm looking for a way to poll number of calls per Edge from the API, similar to what's displayed in Metrics in the web gui under Admin -> Telephony -> Metrics I'm iterating the trunks, but the number of calls does not add up to the same amount as under metrics for some reason.

    Found an earlier post from 2017 which inquired the same, but at that time it was not possible to poll that data. But hopefully by now, it have been made available?

    Thanks.


    tim.smith | 2020-06-25 19:36:56 UTC | #2

    I believe that's using GET /api/v2/telephony/providers/edges/{edgeId}/metrics


    Micael_Ebbmar | 2020-06-26 08:42:18 UTC | #3

    Thanks for your reply, but that API only displays the hw metrics, such as CPU, memory, disk etc. I've looked through the APIs that could remotely be relevant, but no dice so far.

    BR, Micael


    tim.smith | 2020-06-26 14:16:47 UTC | #4

    I don't have a physical edge to be able to test this myself, but if you set up the metrics you're interested in and then watch the network tab in your browser's network tab, you can see what API requests the UI is making. If it's not the metrics endpoint, try GET /api/v2/telephony/providers/edges/sites (has a conversationCount property) or GET /api/v2/telephony/providers/edges/trunks/metrics (has a calls property) or whatever you see happening in the network logs.


    Micael_Ebbmar | 2020-06-29 11:58:19 UTC | #5

    Thanks for the tip! When checking the network tab, I could see the metrics page polled a different API call than I did and after some short rework, it works fine now. Thanks!

    BR, Micael


    tim.smith | 2020-06-29 16:59:48 UTC | #6

    For future searchers, what API resource did you end up using?


    Micael_Ebbmar | 2020-06-30 07:37:31 UTC | #7

    I previously iterated through gettelephonyprovidersedgestrunks() since it was my assumption it should give me all trunks, but when comparing to the output from the Metrics page a few trunks were missing. Ended up using gettelephonyprovidersedgetrunks(edge_id) and that gave me all trunks per edge.

    BR, Micael


    system | 2020-07-31 07:37:31 UTC | #8

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


    This post was migrated from the old Developer Forum.

    ref: 8100