You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been using the Gateways Server API, specifically the bulk stats endpoint, to retrieve stats from my gateways.
Recently I hit a roadblock which defeats the purpose of the endpoint: when a gateway is not found, because it is offline and there’s no stats in the server, the endpoint replies with a 404 error response code, and says some of the gateways aren't found (see Current results)
As a next approach I decided to query the gateways' stats individually, and them remove the ones which were not found, and then query the bulk stats again with I thought was a list of gw that di have stats.
To my surprise, I still had the same 404 error response code, as seen below:
The endpoint should reply with the gateways' stats that are indeed found, and simply leave the devices that have been offline for more than 24 hours out from the response.
This should be fixed by #6711 and will be part of the v3.28.1 release. The root cause seems to be that the caller (i.e. the admin user) is not a collaborator, and the batch rights assertion did not take into account the admin universal rights.
I will leave the issue open for confirmation, and we can close it afterwards.
@adriansmares thank you for you heads up. I tested the endpoint again and I'm no longer getting the 404 "some_gateways_not_found" error.
This to me has been solved.
Summary
I’ve been using the Gateways Server API, specifically the bulk stats endpoint, to retrieve stats from my gateways.
Recently I hit a roadblock which defeats the purpose of the endpoint: when a gateway is not found, because it is offline and there’s no stats in the server, the endpoint replies with a
404
error response code, and says some of the gateways aren't found (see Current results)As a next approach I decided to query the gateways' stats individually, and them remove the ones which were not found, and then query the bulk stats again with I thought was a list of gw that di have stats.
To my surprise, I still had the same
404
error response code, as seen below:Steps to Reproduce
404
error response code.Current Result
This is response from the endpoint
Expected Result
The endpoint should reply with the gateways' stats that are indeed found, and simply leave the devices that have been offline for more than 24 hours out from the response.
Relevant Logs
No response
URL
https://.nam1.cloud.thethings.industries/api/v3/gs/gateways/connection/stats
Deployment
The Things Stack Cloud
The Things Stack Version
No response
Client Name and Version
Other Information
No response
Proposed Fix
No response
Contributing
Code of Conduct
The text was updated successfully, but these errors were encountered: