azure - Get TFS Webhook SubscriptionStatus
问题描述
From my previous question link here it appears that we do not have a feature in any version of TFS/Azure DevOps to setup monitoring for the webhook subscriptions.
As a workaround I'm now looking to write a PowerShell script to check the heartbeat of the subscription. From the Microsoft documentation link here it appears we can get the SubscriptionStatus by querying the subscription ID.
On a GET request for below API I receive all the details specified in the documentation but I'm unable to find "status" in the response. Does anybody know if there is any other way to get the SubscriptionStatus.
https://collectionurl/_apis/hooks/subscriptions/3d9af4ba-d642-4c80-8d62-34cabca322f9
解决方案
尝试列出订阅:
GET https://collectionurl/_apis/hooks/subscriptions?api-version=5.1
您可以使用查询参数过滤结果,如下所示:
GET https://collectionurl/_apis/hooks/subscriptions?publisherId={publisherId}&eventType={eventType}&consumerId={consumerId}&consumerActionId={consumerActionId}&api-version=5.1
你应该status
在某个地方看到那里。
推荐阅读
- ios - Xib 文件中的表格视图无法正确加载自定义表格视图单元格
- java - 如何使用 CameraX 构建我的自定义相机?
- c - 交叉编译程序中的编写问题(Linux -> Windows)
- android - Build failed in add firebase when added apply plugin: 'com.google.gms.google-services'
- hadoop - Hive 分组中的减速器数量和计数(不同)
- yacc - Lex/Yacc 编译失败
- java - 我的一个测试用例没有通过 .Giving TLE for one case
- python - 如何使用 tsnnames.ora 文件将 python 与数据库连接?
- java - HIVE 4:由于未找到 cortex.connector 模块而无法启动
- javascript - JavaScript 代码中的错误?For 循环与 Foreach 循环