Skip to content
This repository has been archived by the owner on Sep 14, 2019. It is now read-only.

Document querying parameters #51

Open
gbinal opened this issue Mar 18, 2016 · 3 comments
Open

Document querying parameters #51

gbinal opened this issue Mar 18, 2016 · 3 comments
Milestone

Comments

@gbinal
Copy link
Contributor

gbinal commented Mar 18, 2016

So far, here's what I've figured out:

  • Page number
  • Filter by 1 column
  • Filter by more than 1 column (returns results that have both value1 and value4)
    • ?[columnheader1]=[value1]&[columnheader3]=[value4]
    • example
  • Filter by multiple options in a column (returns results that have value1 OR value2)
    • ?[columnheader1]=[value1]&[columnheader1]=[value2]
    • example
  • Return an individual record
  • Return the meta structure for the api
  • Sort

Here's what I haven't figured out but am hoping works:

  • set number of resources per page (e.g. ?limit=30 or ?limit=none)
  • search (e.g. ?q=text or ?q=text+term or ?q=term+OR+term)
  • sort (e.g. ?sort=[columnhearder2] or ?sort=-[columnhearder2])
  • exclude (e.g. ?[columnheader1]=[value1]&[columnheader3]=-[value4]) (return all entries that have value1 in columnheader1 but exclude those that have value4 in columnheader3).
  • return only certain fields (e.g. ?field=columnheader2)
  • min/max (e.g. ?max[columnheader1]=[value1]_ (returns all records with a value less than or equal to value1)
  • range? (not sure how that'd be constructed but it'd be nice.

I filed an issue with the original project but don't know if it'll get answered.

Anyone have any guesses?

@GUI
Copy link

GUI commented Mar 18, 2016

It looks like perhaps some of the parameters you're trying to use (at least limit and sort) were implemented in sandman2 on 09-16-2015. It looks like autoapi uses @jmcarp's forked version that was last updated on 09-03-2015.

I'm not really sure about the details beyond that, but that might help to clear up any confusion with the upstream project. However, aside the parameters listed in sandman's test file, I'm not really sure of a definitive list of supported parameters. But on a quick glance, it seems like some of these would still need to be implemented.

@gbinal
Copy link
Contributor Author

gbinal commented Mar 18, 2016

Ahhhhhh...... That would explain that.

Thanks a bunch for pointing out the test file. Interestingly, I am getting sort to work now, but not limit. It would make sense though that this would be an issue if we haven't factored in the more recent sandman2 code into what I'm hitting.

@vrajmohan
Copy link
Contributor

  • set number of resources per page

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants