【问题标题】:API 'metadata' is not supported for environment while posting to Azure Time Series Insight发布到 Azure 时序见解时,环境不支持 API“元数据”
【发布时间】:2020-08-06 15:55:24
【问题描述】:

上下文:我正在尝试通过邮递员和获取将 json 内容发布到 Azure 时序洞察,

{
    "error": {
        "code": "InvalidInput",
        "message": "API 'metadata' is not supported for environment 'xxxxxxxx-1797-xxxx-82xx-639xxxx51af8'."
    }
}

在进行“GET”调用时,我收到了响应,

{
    "environments": [
        {
            "displayName": "perf_lab",
            "environmentId": "xxxxxxxx-1797-xxxx-82xx-639xxxx51af8",
            "environmentFqdn": "xxxxxxxx-1797-xxxx-82xx-639xxxx51af8.env.timeseries.azure.com",
            "resourceId": "/subscriptions/xxxxxxxx-1797-xxxx-82xx-639xxxx51af8/resourcegroups/Rg01/providers/Microsoft.TimeSeriesInsights/environments/perf_lab",
            "features": [
                "TimeSeriesQuery",
                "TimeSeriesModel",
                "ColdStore",
                "WarmStore"
            ],
            "roles": [
                "Reader",
                "Contributor"
            ]
        }
    ]
}

我的负载正在尝试 for POST 调用,

{
"test_details": [
        {
            "project_name": "APIM"
        },
        {
            "test_Name": "SimpleLoadTest"
        },
        {
            "test_id": "LoadTest01"
        },
        {
            "test_executer": "Administrator"
        }
    ],
    "response_Details": [
        {
            "requestName": "JSR223 Sampler",
            "status": "Success",
            "responseTime": 1616,
            "responsecode": "200",
            "sentBytes": 0,
            "receivedBytes": 0,
            "responseMessage": "OK",
            "samplecount": 1,
            "errorCount": 0,
            "time": 1596682980831
        }
    ],
    "thread_Details": {
        "number_vusers": 1
    }
}

网址:https://xxxxxxxx-1797-xxxx-82xx-639xxxx51af8.env.timeseries.azure.com/metadata?api-version=2016-12-12

【问题讨论】:

    标签: azure azure-active-directory postman azure-timeseries-insights


    【解决方案1】:

    很遗憾,/metadata 端点仅适用于 Azure Time Series Insights Gen1

    如果您尝试访问 Azure 时序见解 Gen2 环境的 /metadata 端点,预计会得到这样的响应:

    {
        "error": {
            "code": "InvalidInput",
            "message": "API 'metadata' is not supported for environment 'XX'."
        }
    }
    

    【讨论】:

    • 在这种情况下,我在 gen2 中如何克服这个问题?
    • @JYOTIPRAKASHMALLICK 基于Environment APIs for Azure Time Series Insights Gen2:“获取事件架构 API:返回给定搜索范围的事件架构元数据。”。所以你应该为 Gen2 使用Get Event Schema API。请注意,此 API 应接受 {"searchSpan": {"from": "2018-08-01T00:00:00.000Z","to": "2018-08-31T00:00:00.000Z"}} 作为请求正文。
    • @JYOTIPRAKASHMALLICK 此外,根据我的测试,Get Event Schema API 中的“试用”功能有问题。您也可以在 Postman 中对其进行测试。
    • 如何将任何 JSON 负载发布到时间序列洞察力?有没有办法像我们可以发布 json 内容后跟时间戳作为关键参数?我面临架构定义的问题,我正在关注“docs.microsoft.com/en-us/rest/api/time-series-insights/…
    • @JYOTIPRAKASHMALLICK 我主要关注 Azure AD,我对 azure-timeseries-insights 的了解相对有限。所以建议开一个带有 azure-timeseries-insights 标签(没有 azure-active-directory 标签)的新帖子,引起相应工程师的注意。谢谢:)
    猜你喜欢
    • 2018-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-15
    • 2018-11-21
    • 1970-01-01
    相关资源
    最近更新 更多