Aly_Nofal | 2020-08-12 15:11:35 UTC | #1
Hello Team, Good Day !
First , here is what i am looking for "Enable Edge Logs using API's and download it"
Looking into the Available API's , i found the following:
1- Make a call to POST /api/v2/telephony/providers/edges/{edgeId}/logs/jobs, which should return a jobID
2- Use GET /api/v2/telephony/providers/edges/{edgeId}/logs/jobs/{jobId} with the job id from step 1. This should return a list of files with ids.
3- Use POST /api/v2/telephony/providers/edges/{edgeId}/logs/jobs/{jobId}/upload specifying fileIds, a list of ids from the last GET for the files you wish to upload
4- Use GET /api/v2/telephony/providers/edges/{edgeId}/logs/jobs/{jobId} again with the original jobId from step 1. Keep doing this until you find the edge log/pcap with the status of UPLOADED and it should have a link to download that log.
I was able to get the following results:
{ "state": "active", "files": [ { "id": "1f058a5e-9c5a-4b60-826f-31179e95f21e", "state": "active", "timeCreated": "2020-08-12T07:30:21.016Z", "timeModified": "2020-08-12T07:30:23.346Z", "sizeBytes": 12749803, "uploadStatus": "UPLOADED", "edgePath": "x-inin-edge://inintracetopicroot/2020-08-11/captures/fullnetworkcapture/17216132all202008111311561.pcap.zip", "downloadId": "6406c0c3" }, { "id": "d88f7bb1-f75d-41fe-b32f-eddecb0dce4d", "state": "active", "timeCreated": "2020-08-12T07:30:20.739Z", "timeModified": "2020-08-12T07:30:21.015Z", "sizeBytes": 736409, "uploadStatus": "UPLOADED", "edgePath": "x-inin-edge://inintracetopicroot/2020-08-11/captures/fullnetworkcapture/17216132all202008111244041.pcap.zip", "downloadId": "b0abc944" } ] }
My Questions here: 1- I had to enable the Captures Manually "Network Capture, Protocol Capture and Media Capture" before running the above API's , is there a way to Call API to enable the Log automatically ? is there an available API to enable the Captures ? 2- I checked the Edges >> My Edge >> Diagnostics tab and Log is there , Is there an API to download the uploaded Logs without Manually download it ?
Thanks, Aly Nofal
John_Carnell | 2020-08-18 18:51:11 UTC | #2
Hi Aly,
Welcome. I have forwarded your question onto the developer who wrote the feature and hope to hear back from today or tomorrow.
thanks, John
sneha.tiwari | 2020-08-19 18:57:28 UTC | #3
Hi Aly,
Apologies for the delay. If you are looking for the apis to see the network status of the edges. We have few endpoints which might help you. These apis execute network diagnostic commands for a given host ip address.
Steps 1: Choose any of the post apis
POST: /api/v2/telephony/providers/edges/{edgeId}/diagnostic/ping
POST: api/v2/telephony/providers/edges/{edgeId}/diagnostic/route
POST: /api/v2/telephony/providers/edges/{edgeId}/diagnostic/nslookup
POST: /api/v2/telephony/providers/edges/{edgeId}/diagnostic/tracepath
Request Payload Example:
{ "host": "10.27.79.240" }
In response you will get a self uri
Response Example:
{
"selfUri": "/api/v2/telephony/providers/edges/{edgeId}/diagnostic/ping"
}
STEP 2 :
Use that self uri to get the diagnostic information of the executed network command for the edge. Paths of Get endpoints are same as POST.
GET: /api/v2/telephony/providers/edges/{edgeId}/diagnostic/ping
GET: /api/v2/telephony/providers/edges/{edgeId}/diagnostic/route
GET: /api/v2/telephony/providers/edges/{edgeId}/diagnostic/nslookup
GET: /api/v2/telephony/providers/edges/{edgeId}/diagnostic/tracepath
Response Example:
{
"commandCorrelationId": "cda9e939-31d9-48da-8fa0-64879826200b",
"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\n--- 10.27.79.240 ping statistics ---\n4 packets transmitted, 0 received, 100% packet loss, time 3062ms\n\n\nError exitCode=1 on cmd=/usr/bin/ping -a -D -c 4 -4 10.27.79.240"
}
Feel free to reach out to us if you need any other information.
Thanks,
Sneha
system | 2020-09-19 18:54:29 UTC | #4
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: 8559