ottoflux | 2019-05-23 21:10:45 UTC | #1
I have a customer who wants to monitor PureCloud with their network monitoring software and I'm writing a shim service to handle most of the heavy lifting so they can get information back directly.
I've been falling down a rabbit hole looking at edges/trunks/lines and trying to see the best way to get a clean list of lines and their states like you get at Telephony -> Trunks in PureCloud Admin.
Thoughts? I'm trying not to completely reverse engineer it from the network tab in my browser.
tim.smith | 2019-05-24 14:06:25 UTC | #2
That page is making more than one API request and there's not a single API endpoint that will give you all of the data at once. You'll have to piece it together from the Telephony APIs.
ottoflux | 2019-05-24 14:50:02 UTC | #3
Okay - I was hoping I was missing something, I'll go the trunkBase, trunks, etc. route. I am just trying to minimize the number of calls I'm making because of the API limit, etc. because I'm looking to monitor all of the following for them:
Peak license Peak trunk (Calls) Peak network Peak processor Peak HDD Edge server UP state LAN/WAN interfaces of each Edge device Ping internal/external IPs on devices Trunk Up/Down status
Obviously some of this (pinging EXT IPs) isn't going to hit the count but I'm trying to keep the total low enough I can poll in intervals that make sense for the customer.
Maybe up/down trunk status could be added to the notification service eventually?
Thanks Tim - I'll keep digging and try to keep it clean. :slight_smile:
ottoflux | 2019-05-24 15:12:32 UTC | #4
(and yeah, I know a lot of the Edge data comes in one call to the metrics which is why I was asking about the line side)
tim.smith | 2019-05-28 15:04:14 UTC | #5
It would be helpful to submit your use case at https://purecloud.ideas.aha.io/ideas. Sharing your use cases helps drive API improvements and new features.
ottoflux | 2019-05-28 23:59:54 UTC | #6
So... it looks like I want what comes back with /api/v2/telephony/providers/edges/trunks/
"connectedStatus": { "connected": true, "connectedStateTime": "2019-05-21T07:15:44.267Z }
But not TelephonyProvidersEdgeApi.GetTelephonyProvidersEdgesTrunks() ... am I missing something?
tim.smith | 2019-05-29 16:02:26 UTC | #7
Those properties aren't publicly documented, which is why they aren't in the API docs or SDKs. I'm checking to see if they can be publicly released. In the meantime, you can either make the request manually to get that data or you can modify the Trunk class to have the necessary properties and use a local build of the SDK.
ottoflux | 2019-05-29 16:05:20 UTC | #8
Yeah - working around it with RestSharp and Newtonsoft.Json.Linq for now. Those are kind of important properties if you want to report on the status of a line. At least that seems to be where the UI for PureCloud is getting the data.
ottoflux | 2019-05-29 23:43:40 UTC | #9
(And thanks again for verifying, I'll add it to aha)
system | 2019-06-29 23:43:41 UTC | #10
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: 5226