Hi,
I have a working powershell script to pull a list of all of our endpoints.
-----------------------------------------------
$token = Read-Host -Prompt "Enter your API account token now"
$bearer = "Bearer",$token
$header = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$header.Add("authorization", $bearer)
$request = Invoke-RestMethod -Uri "https://webapi.teamviewer.com/api/v1/devices" -Method Get -Headers $heade
$request.devices | Select-Object -Property "remotecontrol_id","alias","online_state","last_seen","groupid" | Export-Csv "C:\TVDevicesListExport.csv"
-----------------------------------------------------
I need to call /api/v1/reports/connections to download a .csv of the default connection report generated for a group.
For example, I go the Tensor Portal, click on desired group, then click 'Connection Reports' and export to .CSV. That is my end goal and I want to do that programmatically. If anyone has an example of generating a connection report using the TeamViewer API, that would be very helpful. +1 if you're doing it using Azure Functions or something similar.