You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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
changed the title
API resources listing parameters proposition
API resources request parameters unification
Dec 18, 2022
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:
page=x
, wherex
is an integer >=1 we will do a pagination, withpagesize=50
by defaultsortby=x
, wherex
is a string of the list of attributes to sort with separated by a comma, the order will by defaultorder=asc
filter_by=x
, wherex
is a string of the attribute to filter with andfilter_value=y
withy
the filter (e.g?filter_by=name&filter_value=syp
will return all the resources that have a name containingsyp
)The text was updated successfully, but these errors were encountered: