21224 - More REST API fixes for new query param structure

This is working with Drupal now.

@tjwebb
Please review this and see if I missed anything you had teed up for this issue.
I noticed that you have a package.json file in lib/query.  Should this be moved to our main package.json?