API: support query filters for States endpoint
Merge pull request #814 from jonboulle/master

api: implement query parameters