Showing results for 
Show  only  | Search instead for 
Did you mean: 

Invoke-RestMethod Error 504

Here to help

Invoke-RestMethod Error 504



I am making a list of all my clients connected to a network by API. I have always used the Invoke-RestMethod due to the fact that the parameters I receive are easy to deal with, my problem recurs when I filter by timespan and page always returns a gateway timeout error message.
I have tried to set a timeout time but the same problem still appears.


$response = Invoke-WebRequest -Uri $url -TimeoutSec 320 -Method 'GET' -Headers $headers -Verbose




Kind of a big deal

Re: Invoke-RestMethod Error 504

I'd try again later.  Maybe the API load balancer is having an issue.


If you have done lots of API calls within a second it may also be ignoring you.

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.