Help

Passing Parameter Values

All parameters should passed as query parameters to the proxy URL. For example, if you’re proxying the URL http://example.com/users/{id}/search?q={q}, then you can pass your parameters as follows (where [username] is your account’s username):

http://proxy.storyteller.io/[username]/example/users/1/search?q=sushi

This will pass the parameters id and q with the values of 1 and sushi to the underlying API URL. In this case, the proxy will fetch http://example.com/users/1/search?q=sushi and return it.

Note that any extra parameters that were not specified when the proxied resource was created will be passed along to the underlying URL as additional query parameters. So, a call to

http://proxy.storyteller.io/[username]/example/users/1/search?q=sushi&page=2

will fetch and cache this API URL: http://example.com/users/1/search?q=sushi&page=2. The order of the extra parameters passed to the proxy URL doesn’t matter.

Effect on Caching

When different parameter values are passed to the proxy URL, we treat it as a new version of the resource. It is cached separately from other versions with different parameter values. As a result, each version has its own 5 minute refresh clock.

A request to /[username]/example/users/1/search?q=sushi is cached separately from /[username]/example/users/1/search?q=burritos. If you want to manually refresh one of these URLs, you must send the same parameters to the URL during the PUT request.

In summary, responses are cached in a parameter safe way, so a request with one set of parameters will be cached independently of one with a different set.