I need to design a REST API to return a resource for a set of parameters. Let us say I need to return a sequence of the numbers, which is determined by three parameters: the generating method, the initial seed, and the scale. The first draft I come up is
(GET/POST) http://url/sequence?method=A&seed=100&scale=5. The sequence is generated on the fly but is deterministic given the parameter set (A,100,5), so therefore cacheable. But this feels very unrestful. I can maybe change it into
(GET) http://url/sequence/A/100/5. Which one is better? Or neither is good?
Also, scale might be optional with the default value 1. This is easy to handle as query but not so obvious in URL path. How should I handle it?
I should have added some information of my parameter set. There are only a few "method"s, but there are in principal infinite "seed"s and "scale"s.