Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order option for records returned by petitions.json? #773

Open
ghost opened this issue Jan 12, 2021 · 2 comments
Open

Order option for records returned by petitions.json? #773

ghost opened this issue Jan 12, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 12, 2021

Currently I can search for bees in the list of rejected petitions via the following:

https://petition.parliament.uk/petitions.json?q=bees&page=1&state=rejected

Or list debated petitions via:

https://petition.parliament.uk/petitions.json?page=1&state=debated

I wondered if there is any additional parameter which can be passed to the search URL to allow results to be sorted by e.g. creation date, either ascending or descending?

I have searched first before raising this question but couldn't see anything, so maybe it's not an option?

Thanks

Jim

@pixeltrix
Copy link
Contributor

Hi Jim,

Sorry for the delayed reply - there isn't currently an option to specify an arbitrary sort order as we try to optimise our database queries so that indexes are used all the time. However we might consider adding a specific limited set of custom sort orders to our JSON api requests to allow researchers to get easier access to data. Do you have a particular use case?

@ghost
Copy link
Author

ghost commented Apr 19, 2021 via email

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

No branches or pull requests

1 participant