Closed AlvaroVega closed 4 months ago
A delete method with body is not fully restful but is not so ilegal, but we can look for other methods. @fgalan what do you think?
It is not illegal, but not sure if some network middleware (proxies, etc.) could have issues with this. Maybe it's better to avoid this risk using another approach.
Maybe we could use POST /iot/op/delete
. This makes explicit that we are not using a REST operation (as we are not acting on a given resource, i.e. a device in IOAT API terms) but a kind of RPC operation (this is similar to the approach used in Orion API with the POST /v2/op
operations family).
A delete method with body is not fully restful but is not so ilegal, but we can look for other methods. @fgalan what do you think?
It is not illegal, but not sure if some network middleware (proxies, etc.) could have issues with this. Maybe it's better to avoid this risk using another approach.
Maybe we could use
POST /iot/op/delete
. This makes explicit that we are not using a REST operation (as we are not acting on a given resource, i.e. a device in IOAT API terms) but a kind of RPC operation (this is similar to the approach used in Orion API with thePOST /v2/op
operations family).
Taking a look to resource already used by device API:
I was looking for something like POST /iot/devices/delete
I understand (as seen in commit 9752b31efec19c2cc51726948d33189e3e48b2e2) that at the end we are going to use POST /iot/op/delete
.
issue https://github.com/telefonicaid/iotagent-node-lib/issues/1578