[openstack-dev] [api-wg][api][neutron] How to handle invalid query parameters
hongbin.lu at huawei.com
Wed Mar 7 21:09:03 UTC 2018
This is a follow-up for the discussion in Dublin PTG about how Neutron API server should handle invalid query parameter . According to the feedback, I sent this ML to seek advice from API-WG in this regards.
As a brief recap, we were discussing how Neutron API server should behave if invalid query parameters were inputted. Per my understanding, the general consensus is to make Neutron API server behave consistently with other OpenStack projects. The question for API-WG is if there is any guideline to clarify how OpenStack projects should handle invalid query parameters. Query parameters are various across different projects but it seems most projects support these four categories of query parameters: sorting, pagination, filtering, and fields selection. I saw API-WG provided a guideline to define how to handle valid parameters of these categories , but it doesn't seem to define how to handle invalid parameters.
I wonder if API-WG could clarify it. For example, if users provide an invalid filter on listing the resources, should the API server ignore the invalid filter and return a successful response? Or it should return an error response? Below is a list of specific scenarios and examples to consider:
1. Invalid sorting. For example:
2. Invalid pagination. For example:
3. Invalid filter. For example:
4. Invalid field. For example:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev