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

Allow request parameters to modify datasource endpoint #135

Closed
jimlambie opened this issue Mar 15, 2017 · 0 comments
Closed

Allow request parameters to modify datasource endpoint #135

jimlambie opened this issue Mar 15, 2017 · 0 comments
Assignees

Comments

@jimlambie
Copy link
Contributor

jimlambie commented Mar 15, 2017

Currently datasource filters can be modified when the request contains parameters that match with a datasource's requestParams object. For example:

"requestParams": [
  {
    "param": "channel",
    "field": "channel"
  }
]

When a route such as /channels/:channel is requested, the :channel parameter is added to the request. e.g. /channels/three will result in req.params = { "channel": three" }. This is added to a datasource filter such that ?filter={"channel":"three"}

There is now a requirement to be able to modify a datasource endpoint in a similar way, for example it'd be ideal to inject parameters into the endpoint from the request, when endpoints like 1.0/channels/{channel} or 1.0/channels?channel={channel} have been specified.

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

1 participant