Requesting an Example how Edge Diagnostics Work Please

NOTE: I am using the API Explorer logged into my Org. I did test that I am able to retrieve Edge listings and Edge Metrics using the API Explorer.

I am not able to get the Diagnostic Get/Post request to work. Let's take the Ping Diagnostic as an example (api/v2/telephony/providers/edges/{edgeId}/diagnostic/ping):

I am assuming that you do the following:

  1. Make a GET request with the Edge (host) IP or FQDN in the body - I used the Public IP address.
  2. Confirm receipt of a 202 Accepted.
  3. Make a POST request to get the result.

Steps 1 and 2 work but what happens as a result of Step 3 is that I receive a 400 Error. "message": "Network diagnostic not found for the command: PING for edge : [my Edge ID]

What am I not doing correctly? Thanks!

Hi Dan,

I talked with the developer who wrote this code and confirmed the following. A ping request is a two-part process.

  1. The first request (A POST) sends a message down to the edge via
    Genesys Cloud. The edge then processes the request back and sends a
    message back to Genesys Cloud. For example, the following POST used in our
    dev environment returns:

POST: https://public-api-v2.us-east-1.inindca.com/api/v2/telephony/providers/edges/39fc3487-9dc1-4b27-849c-e244d09d3283/diagnostic/ping
{
"host": "10.27.79.240"
}

  1. The response you receive back contains the GET URI that you should use to retrieve the diagnostic. In the example above, the response would contain the following URI:

GET: https://public-api-v2.us-east-1.inindca.com/api/v2/telephony/providers/edges/39fc3487-9dc1-4b27-849c-e244d09d3283/diagnostic/ping

Using the endpoint above, you should receive a payload that looks like this:

{
    "commandCorrelationId": "97cb4264-5cc0-450c-8da3-dc7498734c3e",
    "diagnostics":"\n====== /usr/bin/ping -a -D -c 4  -4 10.27.79.240 ======\nPING 10.27.79.240 (10.27.79.240) 56(84) bytes of data.\n[1597173207.322410] 64 bytes from 10.27.79.240: icmp_seq=1 ttl=255 time=0.014 ms\n[1597173208.331322] 64 bytes from 10.27.79.240: icmp_seq=2 ttl=255 time=0.031 ms\n[1597173209.351781] 64 bytes from 10.27.79.240: icmp_seq=3 ttl=255 time=0.023 ms\n[1597173210.375791] 64 bytes from 10.27.79.240: icmp_seq=4 ttl=255 time=0.024 ms\n\n--- 10.27.79.240 ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3053ms\nrtt min/avg/max/mdev = 0.014/0.023/0.031/0.006 ms\n"
}

A couple of other things:

  1. There should not be a long lag between the two calls in terms of sending requests for data and getting the result posted. It usually takes seconds to get your diagnostics request processed.

  2. A diagnostic request will be cached for up to 10 days.

  3. If the diagnostic request was not found, you should get a 404 HTTP status code back.

  4. A 400 HTTP status code indicates a problem with the request being fulfilled.

I would try the ping again with the steps outlined above. If you continue to have problems please do the following:

  1. Open a ticket with our CARE team.
  2. Please make sure you provide the organization id you are working in and the date and time of the request. This will help us isolate in the logs your specific request and debug what is exactly going on.
  3. Provide the exact URL, action, and BODY of the request.
  4. Post the ticket to this thread if you do open one. I used to manage the team that wrote this code and can help shepherd the request if you feel like you are getting stuck.

I would ask though that if you are getting stuck you open a ticket as it will help me track the issue.

I hope that helps.

Thanks,
John Carnell
Manager, Developer Engagement

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