The problem was in my script. It is working properly again.
Hi @DougAtBHB
Not sure what language you are using for the script, but we are a Freshworks partner and created a free, open source Powershell module\library for Freshservice:
https://www.flycastpartners.com/freshserviceps
There is built-in logic for 429 to wait and also an artificial throttle to ensure the scripts do not consume all API calls that would impact workflows or other integrations using the API. This is a bit of Verbose output to show the page and where the script is using the minute rate limit:
VERBOSE: Invoke-FreshworksRestMethod - Invoking REST GET Method on https://its-fine.freshservice.com/api/v2/agents?page=1&per_page=100...
VERBOSE: Invoke-FreshworksRestMethod - Forcing TLS 1.2 protocol for invoking REST method.
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Returned status OK with code 200.
VERBOSE: Current FreshService minute rate limit is 140 with 139 calls remaining (0.71% used) .
VERBOSE: Invoke-FreshworksRestMethod - Completed REST GET Method on https://its-fine.freshservice.com/api/v2/agents?page=1&per_page=100 in 00:00:01.5134094.
VERBOSE: Returning agents property with count 12
The code is open source if you want or simply use the module, the logic is already built in for any API call so it’s just a simple command to get tickets with automatic paging:
$tickets = Get-FSTicket
Hi @DougAtBHB
Not sure what language you are using for the script, but we are a Freshworks partner and created a free, open source Powershell module\library for Freshservice:
https://www.flycastpartners.com/freshserviceps
There is built-in logic for 429 to wait and also an artificial throttle to ensure the scripts do not consume all API calls that would impact workflows or other integrations using the API. This is a bit of Verbose output to show the page and where the script is using the minute rate limit:
VERBOSE: Invoke-FreshworksRestMethod - Invoking REST GET Method on https://its-fine.freshservice.com/api/v2/agents?page=1&per_page=100...
VERBOSE: Invoke-FreshworksRestMethod - Forcing TLS 1.2 protocol for invoking REST method.
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Returned status OK with code 200.
VERBOSE: Current FreshService minute rate limit is 140 with 139 calls remaining (0.71% used) .
VERBOSE: Invoke-FreshworksRestMethod - Completed REST GET Method on https://its-fine.freshservice.com/api/v2/agents?page=1&per_page=100 in 00:00:01.5134094.
VERBOSE: Returning agents property with count 12
The code is open source if you want or simply use the module, the logic is already built in for any API call so it’s just a simple command to get tickets with automatic paging:
$tickets = Get-FSTicket
Coincidentally, I am using PowerShell too. I thought I was the only one ;)
Thanks for sharing. I’ll take a look.