On 13 May 2015, at 15:34, Matt Wringe wrote:
Personally I think a matrix parameter makes a lot more sense
http://hawkular/metrics;tenant=foo/gauges/....
versus
http://hawkular/metrics/gauges/....?tenant=foo
Always having to specify tenant at the end of the url seems strange to
be. Logically I would think that it should be applied to the metrics
resource itself and not to all the child resources.
Well.. We had it in the 1st place before the recent change, which made
it very explicit that everything in the url right to it belonged to that
tenant.
Something like this would normally mean that the parameter 'a' is to be
applied to the 'foo/bar' resource:
http://foo/bar;a=b/baz
While, something like this would normally mean that the parameter 'a' is
to be applied to the 'foo/bar/baz' resource:
http://foo/bar/baz?a=b
I do not think we may want to have the tenant(id) at "arbitrary" levels
of he resource path (e.g.
http://foo/bar/baz;tenant=bla meaning foo/bar
is shared by all tenants, while baz is now for tenant bla), so I see
this as sort of arbitrary.
Using the matrix parameter has the advantage that is omits the ? which
is a meta-character in shell and often needs special encoding (more so the &
in query-parameterS).
It has the disadvantage though, that one has to remember where in the
path it has to go as opposed to the query parameter, where everyone
knows that they end up in the end after the ? and the order of key-value-pairs
can be in random order.
Personally I'd go for a query parameter.