在PagerDuty api v1中,用户可以获取该页面上显示的单个用户的日程安排:here
如何使用v2接口产生相同的结果?
我尝试使用与v1中相同的端点,但它返回
{'error': {'code': 2100, 'message': 'Not Found'}}对我来说,很难从v2的PagerDuty文档中获得有用的信息。
发布于 2017-08-19 02:55:53
“我尝试使用与v1相同的终结点...”
我假设您的端点如下所示:
V1 https://my-account.pagerduty.com/api/v1/schedules/P538IZH/entries?since=2017-03-01&until=2017-03-20" (返回日期范围的条目列表)
V2 https://api.pagerduty.com/schedules/P538IZH/entries?since=2017-03-01&until=2017-03-20" (返回错误2100)
在V2接口中,您将排除端点的/entries部分:
https://api.pagerduty.com/schedules/P538IZH/?since=2017-03-01&until=2017-03-20"
This API call can be made right from the docs.
如果您正在查找要在api.pagerduty.com/schedules/<ID> try the list schedules call first中使用的ID
https://stackoverflow.com/questions/42854636
复制相似问题