You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http://sth-host/STH/v1/contextEntities/type/Room/id/Room5/attributes/splid?hLimit=4&hOffset=0
and following are the logs:
time=2019-06-05T01:24:27.970Z | lvl=DEBUG | corr=a43fb9b1-ed50-4de4-9960-b9bace773ce5 | trans=a43fb9b1-ed50-4de4-9960-b9bace773ce5 | op=OPER_STH_GET | from=n/a | srv=testdb | subsrv=/testservicepath | comp=STH | msg=No raw data available for the request: /STH/v1/contextEntities/type/Room/id/Room5/attributes/splid?hLimit=4&hOffset=0
I have made subscriptions for two attributes that is pressure and temperature ,but when I make request for non existing attribute splid it give 200 OK.
But it should return 404 Not Found as the attribute does not exist for which the request is made.
The text was updated successfully, but these errors were encountered:
However, I'm a bit unsure of what we should do regarding this... From a formal point of view, I agree that 404 Not Found would be more correct. However, if we change this maybe we are impacting in all the STH clients that have been used the API for years with the current behavior. And the gain would not be really too much (only to make STH slightly more "formal" with regards to API REST).
In this kind of situations, I tend to prefer backward compatibility security over API REST formality.
What do you think? What do other people think? Feedback is welcome!
Hi @fgalan, @AlvaroVega
As per my understanding the "404 Not Found" status code must be implemented for this issue as formal behavior of API and also sometimes the user may get confused about the empty values as 200 status code is returned. Also we can update the documents for these changes.
So can we implement the "404 Not Found" status code for both issues( #511 and #435 )?
As per my understanding the "404 Not Found" status code must be implemented for this issue as formal behavior of API and also sometimes the user may get confused about the empty values as 200 status code is returned. Also we can update the documents for these changes.
So can we implement the "404 Not Found" status code for both issues( #511 and #435 )?
But in that case backward compatibility would not be preserved, would it?
When executing the GET request of STH API for return historic information for non existing attribute, it returns 200 OK
The request is made by using
http://sth-host/STH/v1/contextEntities/type/Room/id/Room5/attributes/splid?hLimit=4&hOffset=0
and following are the logs:
time=2019-06-05T01:24:27.970Z | lvl=DEBUG | corr=a43fb9b1-ed50-4de4-9960-b9bace773ce5 | trans=a43fb9b1-ed50-4de4-9960-b9bace773ce5 | op=OPER_STH_GET | from=n/a | srv=testdb | subsrv=/testservicepath | comp=STH | msg=No raw data available for the request: /STH/v1/contextEntities/type/Room/id/Room5/attributes/splid?hLimit=4&hOffset=0
I have made subscriptions for two attributes that is pressure and temperature ,but when I make request for non existing attribute splid it give 200 OK.
But it should return 404 Not Found as the attribute does not exist for which the request is made.
The text was updated successfully, but these errors were encountered: