0

Context: I am trying to post a json content to Azure Time Series Insight, through postman and getting,

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

While making a "GET" call, I am receiving response,

{
    "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"
            ]
        }
    ]
}

My payload trying for the for POST call,

{
"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
    }
}

URL : https://xxxxxxxx-1797-xxxx-82xx-639xxxx51af8.env.timeseries.azure.com/metadata?api-version=2016-12-12 enter image description here

enter image description here enter image description here

Jyoti Prakash Mallick
  • 2,119
  • 3
  • 21
  • 38

1 Answers1

1

Unfortunately, /metadata endpoint is only available for Azure Time Series Insights Gen1.

If you are trying to access the /metadata endpoint of an Azure Time Series Insights Gen2 environment, it is expected to get such a response:

{
    "error": {
        "code": "InvalidInput",
        "message": "API 'metadata' is not supported for environment 'XX'."
    }
}
Allen Wu
  • 15,529
  • 1
  • 9
  • 20
  • in such case how to overcome this issue as I am in gen2? – Jyoti Prakash Mallick Aug 06 '20 at 08:13
  • @JYOTIPRAKASHMALLICK Based on [Environment APIs for Azure Time Series Insights Gen2](https://learn.microsoft.com/en-us/azure/time-series-insights/concepts-query-overview#environment-apis): "Get Event Schema API: Returns the event schema metadata for a given search span.". So you should use [Get Event Schema API](https://learn.microsoft.com/en-us/rest/api/time-series-insights/dataaccessgen2/query/geteventschema) for Gen2. Please note this API should accept `{"searchSpan": {"from": "2018-08-01T00:00:00.000Z","to": "2018-08-31T00:00:00.000Z"}}` as the request body. – Allen Wu Aug 06 '20 at 08:52
  • @JYOTIPRAKASHMALLICK Besides, the "Try It" feature in [Get Event Schema API](https://learn.microsoft.com/en-us/rest/api/time-series-insights/dataaccessgen2/query/geteventschema) has something wrong based on my test. You could test it in Postman as well. – Allen Wu Aug 06 '20 at 08:54
  • how to post any JSON pay load to time series insight? Is there a way like we can post the json content followed by a timestamp as the key parameter? I am facing issue with the schema definition, I am following "https://learn.microsoft.com/en-us/rest/api/time-series-insights/dataaccessgen2/timeseriestypes/executebatch#security" – Jyoti Prakash Mallick Aug 06 '20 at 13:19
  • 1
    @JYOTIPRAKASHMALLICK I mainly focus on Azure AD and my knowledge of azure-timeseries-insights is relatively limited. So it's recommended to open a new post with azure-timeseries-insights tag (without azure-active-directory tag) to get the attention of the corresponding engineers. Thank you:) – Allen Wu Aug 07 '20 at 05:27