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

API resources request parameters unification #2

Closed
syphax-bouazzouni opened this issue Dec 8, 2021 · 2 comments
Closed

API resources request parameters unification #2

syphax-bouazzouni opened this issue Dec 8, 2021 · 2 comments

Comments

@syphax-bouazzouni
Copy link

syphax-bouazzouni commented Dec 8, 2021

Currently, there is no standard way of listing an API resource, e.g "Ontologies , Users , Properties ,... " are not paginated and "Classes, Instances" are.

So I propose this norm, for every API resource we will have the following options:

  • List resources: without any parameter, list all its elements.
  • Paginate the resources: with the parameter page=x , where x is an integer >=1 we will do a pagination, with pagesize=50 by default
  • Sort resources: with the parameter sortby=x, where x is a string of the list of attributes to sort with separated by a comma, the order will by default order=asc
  • Filter resources: with the parameter filter_by=x, where x is a string of the attribute to filter with and filter_value=y with y the filter (e.g ?filter_by=name&filter_value=syp will return all the resources that have a name containing syp)
@jonquet
Copy link

jonquet commented Jul 27, 2022

Discussed today.
The idea is to implement a middleware to handle all the endpoints in a similar way. Coding time seems not too long but the change will require some monitoring as it will change all the requests underneath.

To be discussed with the alliance group.

@syphax-bouazzouni syphax-bouazzouni changed the title API resources listing parameters proposition API resources request parameters unification Dec 18, 2022
syphax-bouazzouni pushed a commit that referenced this issue Jun 12, 2024
@syphax-bouazzouni
Copy link
Author

too old close

@syphax-bouazzouni syphax-bouazzouni closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2024
syphax-bouazzouni added a commit that referenced this issue Nov 6, 2024
Feature: Align to Agroportal  2.9.1 release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants