apache / openwhisk-apigateway

Apache OpenWhisk API Gateway service for exposing actions as REST interfaces.
https://openwhisk.apache.org/
Apache License 2.0
64 stars 45 forks source link

Provide query filters for /apis and /tenants endpoints #56

Closed mdeuser closed 7 years ago

mdeuser commented 7 years ago

Would like to have ability to filter the returned data. Syntax in the following proposed examples is not final, but conveys the kind of filtering being requested.

GET /tenants?namespace=NAMESPACE GET /tenants?namespace=NAMESPACE&instance=INSTANCE GET /tenants/TENANTID/apis?basePath=BASEPATH GET /tenants/TENANTID/apis?name=NAME

alexsong93 commented 7 years ago

@mdeuser do you want the syntax to be how you have it above, or match the syntax of the ys1/prod gateway? (eg. GET /tenants?filter[where][namespace]=NAMESPACE)

mdeuser commented 7 years ago

@alexsong93 I currently have code that uses the Strongloop query filter syntax, but should be easily changeable to another query filter syntax. At one point, @lostinthestory mentioned not wanting to follow the Strongloop syntax.

codymwalker commented 7 years ago

@mdeuser I think so long as we're using the loopback syntax filter in the online case, we should match between both cases.

mdeuser commented 7 years ago

@lostinthestory - That works for me. Thanks.