I'm wondering how best to model in a HATEOAS based API links that allow the client to set parameters. E.g. imagine a search response that returns a list of producst and then refinements that can be performed on them:
{
"results" : {
...
}
"refinements" : {
"Size" : {
"links" : {
"extra small" : "/products?size=xs",
"medium" : "/products?size=m"
}
},
Price : {
links: {
"greater than" : "/products?priceGreaterThan=aValue",
"less than" : "/products?priceLesshan=aValue",
"between" : "/products?priceLesshan=aValue&priceGreaterThan=aValue"
}
}
}
}
The size refinements seem straight forwards but the price refinements require the client to pass a value. How is this typically represented in a HATEOAS link?