有没有办法通过API对Google Workspace应用程序的状态进行编程检查?
Google有 google workspace状态dashboard 他们指示他们是否有任何核心服务在哪里体验是否停电。
因此,我希望能够获取特定服务的状态。例如,我想检查gmail
是否具有以下状态之一:
- 可用的
- 服务中断
- 服务中断
我想在python
中进行API调用,以检索状态并允许我根据当前状态执行诉讼。
有什么办法可以实现这一目标?
我找到了一些文档在这里试图弄清楚我如何做到这一点。
Google has a Google Workspace Status Dashboard where they indicate whether any of their core services are experiencing an outage or not.
Accordingly, I would like to be able to fetch the status for a particular service. For example, I would like to check whether Gmail
has one of the following statuses:
- Available
- Service disruption
- Service outage
I would like to make an API call in Python
that would retrieve the status and allow me to perform an action according to the current status.
Is there a way I can achieve this?
I found some documentation here but I'm still trying to figure out how I can do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
API的问题在于它与仪表板无法直接使用,而是与
Google> Google Workspace Alert Center
中的信息一起使用,这意味着您需要首先设置警报,以便使用API从此特定警报中提取数据,并且仅在此处触发该警报是仪表板中报告的服务中断或中断,因此不会显示有关可用服务的任何数据,而只有在发生中断时。如 bijay regmi 和官方文档我认为最好的选择是,订阅状态仪表板RSS或使用JSON提要。
使用Python,您还可以创建一个RSS读取器以更好的方式提取这些信息,并且可以使用其他堆栈溢出帖子作为有关如何构建它的参考。
The problem with the API is that it does not work directly with the Dashboard, instead it works with the information from the
Google Workspace Alert Center
, meaning that you need to set up an alert first in order to pull the data from this specific alert using the API and the alert will only be triggered when there is a service disruption or outage reported in the Dashboard, so it will not show any data about the service being Available but only when there is an outage.As mentioned by Bijay Regmi and the official documentation, I think the best option would be to subscribe to the Status Dashboard RSS or use the JSON feeds.
With Python you could also create a RSS reader to pull that information in a better way, and you can use this other Stack Overflow post as a reference on how to build it.