In migrating to FastAPI I learned that it's against the HTTP specs to have GET or DELETE endpoints that require a JSON body. (The resource to GET or DELETE should be uniquely identified by the URL.) Since we use JSON bodies for everything and eschew URL parameters, this meant that we had to change almost all of our endpoints to use POST. A few GET endpoints remain, but I wonder if they should be switched to POST just for consistency. For instance, /sensor/list-sensor-types is GET, because it takes no further parameters, but /sensor/list-sensors is POST, because you need to specify in the body which sensor type you want sensors of. I would imagine that users might find this distinction confusing.
In migrating to FastAPI I learned that it's against the HTTP specs to have GET or DELETE endpoints that require a JSON body. (The resource to GET or DELETE should be uniquely identified by the URL.) Since we use JSON bodies for everything and eschew URL parameters, this meant that we had to change almost all of our endpoints to use POST. A few GET endpoints remain, but I wonder if they should be switched to POST just for consistency. For instance,
/sensor/list-sensor-types
is GET, because it takes no further parameters, but/sensor/list-sensors
is POST, because you need to specify in the body which sensor type you want sensors of. I would imagine that users might find this distinction confusing.