Legacy Dev Forum Posts

 View Only

Sign Up

Documentation for Edge logs retrieve via Platform API

  • 1.  Documentation for Edge logs retrieve via Platform API

    Posted 06-05-2025 18:13

    sduque | 2018-03-15 14:49:01 UTC | #1

    Hello there!

    I'm trying to retrive some Edge logs for troubleshooting situations. There are some API endpoints intended for this. However, IMHO, there is no enough documentation to properly consume these endpoints. I have tried creating an edge job, when I try to fetch the Edge logs job (after a long time, thought it was uploading) the files array was still empty.

    Can you please help me with some information? Here are my specific doubts:


    POST /api/v2/telephony/providers/edges/{edgeId}/logs/jobs

    Does the creation of the job starts the logs upload? Is it necessary to execute the next enpoint to start the upload?

    { "path": "", "query": "", "recurse": true }

    • Path: what is the folder structure of the Edge logs folder and what contains each folder? Example:

    ./logs ├── folder1 // description │ ├── folder2 // description │ └── folder3 // description └── folder4 // description ├── folder5 // description ├── folder6 // description └── folder7 // description

    • Query: What kind of queries are suposed to be passed? Documentation says * and ? wildcards are allowed but are those queries applied to file names? folders? absolute paths?

    POST /api/v2/telephony/providers/edges/{edgeId}/logs/jobs/{jobId}/upload

    { "fileIds": [] }

    What are those fileIds value types? (String, I supose)

    Are the file ids the same as the file names? Are they the file abolute path?


    GET /api/v2/telephony/providers/edges/{edgeId}/logs/jobs/{jobId}

    In the response is a files array, what values should that array contain? (I'm getting an empty array) Are those values some links to download the required logs?


    Thanks a lot for the help! I hope this can help someone else.

    Cheers.


    tim.smith | 2018-03-15 19:56:07 UTC | #2

    Here's the information I was able to track down about how to use these APIs:

    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.

    sduque | 2018-03-15 20:04:07 UTC | #3

    tim.smith, post:2, topic:2612
    ld return a list of files with ids.

    Hi Tim, thanks for your response. I'm trying to get the file ids list using a fresh generated job id but the "files" array is empty. Do you know what parameters should I pass when creating the job id to actually get the file ids?


    tim.smith | 2018-03-15 20:16:57 UTC | #4

    In your example above, you're using "query": "" for the request (step 1). I'm guessing that it's using the empty string as the match value and it's not matching anything. You can use an asterisk (i.e. "query": "*") to return all files, or be more specific if you only want certain files. For example, if you're looking for packet captures, use something like "query": "*.pcap|*.pcap.zip".


    sduque | 2018-03-15 21:13:52 UTC | #5

    Thanks a lot Tim. So those logs are the traffic capture.

    It turned out to be that Trunk settings > Diagnostic > Protocol capture must be enabled in the respective Edge trunk(s) in order to get capture log files. Now is working just as you said.

    I thought the logs those endpoints talk about where the same as these logs retrieved vía USB but it seems that both of them refer to traffic capture logs. Do you if there is a way to retrieve some kind of system logs or event logs from an Edge server (physical or VM)? There are some files as the ininedgecontrol.ininlog wich contains information about the Edge functioning.


    agnagy | 2018-03-16 01:06:47 UTC | #6

    You should be able to access .ininlog files using the same process. Have you tried something like: "query": "*.ininlog" ?

    Also, assuming you have the correct permissions, you should be able to access these logs via the Telephony Admin UI under Edges > [Your Edge] > Edge Logs


    agnagy | 2018-03-16 13:45:14 UTC | #7

    Also, if you post your edge ID, we can double check that your edge actually has the correct files.


    sduque | 2018-03-16 13:50:59 UTC | #8

    Hello agnagy, thanks for your answer. Just tried with the "query" : "*ininlog" and had no results. I have all posible Pure Cloud 3 permissions and there is no an "Edge logs" section inside my Edge UI.

    I'm sending you my Edge id vía private message. Thanks a lot.


    tim.smith | 2018-03-16 14:09:34 UTC | #9

    I believe you need to contact PureCloud Support to have the feature enabled to retrieve logs from the edge.


    sduque | 2018-03-16 14:15:18 UTC | #10

    I'll check it out. Thanks tim.


    system | 2018-04-16 14:15:25 UTC | #11

    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: 2612