在特定时间段从 TSI 获取数据帧

Acquiring dataframe from TSI for certain time periods

我正在尝试使用 python 在定义的时间段内从 TSI 中提取一些数据。我想借助为安全目的生成的访问令牌来执行此操作。你能帮我看看如何开始这个过程吗?

@ranah

如何执行此操作取决于您是否要对用户、服务主体/应用程序或通过设备代码选项进行身份验证。查看用于获取 AAD 令牌 here. If it's a user that will be accessing the data within TSI then the user should be granted Reader 或参与者角色的 Python 示例。如果应用程序将调用 API 作为自身,那么您将授予 AAD 应用程序在 TSI 实例上的角色,就像您为用户所做的那样。 在示例代码中,将资源 URI 的值替换为“https://api.timeseries.azure.com/”。尾部斜杠是必需的。 获得 AAD 令牌后,您就可以调用 TSI 的 APIs 获取事件、系列、聚合和模型元数据。 有用的链接: https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad https://docs.microsoft.com/en-us/azure/time-series-insights/time-series-insights-authentication-and-authorization#service-principal