Closed Bug 1317997 Opened 8 years ago Closed 6 years ago

Make the API fail hard if unrecognised parameters are passed

Categories

(Tree Management :: Treeherder: API, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1343263

People

(Reporter: ekyle, Unassigned)

Details

The following URL template used to work, but no longer

https://treeherder.mozilla.org/api/project/{{branch}}/resultset/?format=json&count=1000&full=true&short_revision__in={{revision}}

The problem is that the `*__in` parameters are quietly ignored, and `short_revision` is also ignored. Finding this took an embarrassingly long time.

Please have the RestAPI reject requests with unexpected parameters; especially parameters that used to be valid. At the very least, these rejects will signal to third party clients that the API has changed.
Yeah I agree this would be helpful.

Looking around I found:
https://github.com/carltongibson/django-filter/issues/603#issuecomment-272645546

...which seems to suggest we might have to roll out own implementation to do this, rather than just being able to use django-filters unfortunately.
Summary: Respond with error when invalid parameters are submitted → Make the API fail hard if unrecognised parameters are passed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.