When you are trying to insert/update the data by using a PUT request with the IoT Timeseries API, you get a error as shown below:
Sample BODY :
[
{
"test_variable1": 23.16,
"test_variable2": 4.0711,
"test_variable3": 76.8542,
"test_variable4": 42.0224,
"test_variable5": 50.0655,
"test_variable6": 7.0664,
"test_variable8": 12.6881,
"_time": "2021-06-14T08:40:02.881118100Z"
}
]
{
"timestamp": "2021-06-14T08:59:41.415+00:00",
"status": 400,
"error": "Bad Request",
"message": "[6404] One or more invalid property names specified. One invalid property - test_variable8",
"path": "/api/iottimeseries/v3/timeseries/617b5d378def40d2865f2ad99c57512f/Test_Aspect"
}
Solution
This error comes when you are trying to insert the data by using PUT API to the variable(test_variable) which doesn't exist for the given aspect. To verify this you need to hit GET API and need to check if the variable exists in the list or not.
GET:
https://gateway.eu1.mindsphere.io/api/iottimeseries/v3/timeseries/Test_Aspect
Sample Response:
[
{
"test_variable1": 15.16,
"test_variable2": 4.0711,
"test_variable3": 76.8542,
"test_variable4": 42.0224,
"test_variable5": 25.0655,
"test_variable6": 7.0664,
"test_variable7": 12.6881,
"_time": "2021-06-14T08:50:02.881118100Z"
}
]
Here you can see that "test_variable8" doesn't exist in the response, so you can not update the data with respect to "test_variable8".
If the variable does not belong to the list, then you have to define a correct variable in the payload and send a PUT request to the API.
Notes