API - CDR Usage Report - Array


#1

I am looking for an example of what a “Array of connection IDs” would look like. I have tried to do this in API explorer and through an external curl request but I cannot get any combination to work. Ideally I would like to just put a 1 in aggregation type and have it break the usage down by connection like I can do in the Customer Portal (Mission Control) but I can list all the connections if need be.

If I try to just put a 1 in aggregation type it will process but the linked file just says Access Denied. For the array I have tried to list the connections several different ways but when I click Trigger Endpoint it never does anything.

I am trying to separate usage by connection for different customers if anyone knows an easier way.


#2

Hi Billy,

Thanks for your question.

Here is an example below:

POST: https://api.telnyx.com/reporting/usage_reports

{
“start_time”:“2018-11-20T00:00:00+00:00”,
“end_time”:“2018-11-20T21:59:00+00:00”,
“connections”:[
“950752548405381105”,
“827326720859178678”,
“499017732965009030”
],
“aggregation_type”:1
}

For any request you make from the portal. you can check how the payload is generated by opening up the network inspect and inspecting the network requests.

Best,
Dillin.


#3

Thanks Dillin. Can you tell me where to click to open “network inspect”? I do not see it in the portal anywhere.


#4

Hi Billy,

Apologies, network inspect is usually a feature of the browser if it supports it.

Usually using the F12 key on your keyboard or by right clicking on the web page and then selecting “inspect”.

You’ll want to select the network tab.

See attached screenshot example.

Best,
Dillin.


#5

Thanks Dillin, I understand now. If I generate the report in mission control it displays ok but when I open network inspect I get a report url to a .csv and that link gives me an access denied error.


#6

Sometimes I can get a .csv file to download but it is an empty file with 0s and no data other than the connection ids and column names


#7

Hi Billy,

Thanks for clarifying.

At this point I recommend contacting our support team with an email, support@telnyx.com

I would provide them the parameters you used to generate the csv file from your mission control portal account, along with the file that was downloaded.

Then I would provide them with the JSON request you made through the API, along with the URL you received that shows you a 403 forbidden and a url that you received that gave you empty content.

Please do not add any personal information or url information in this thread.

Best,
Dillin.


#8

Thanks Dillin, I have sent the email.