[Hawkular-dev] Tenant Id - Not Part of URL

Thomas Segismont tsegismo at redhat.com
Fri May 15 11:47:59 EDT 2015


Le 13/05/2015 16:36, Thomas Segismont a écrit :
> Le 13/05/2015 15:34, Matt Wringe a écrit :
>> 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.
>>
>> 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 have no strong preference.
>
> Note that the query param is just a fallback, in case a client can't set
> the header (like somebody sending GET requests manually with a browser).

I've worked on this today and there's an issue with the container: it is 
not able to deal with matrix parameters at the root resource level. So I 
had to create a servlet filter to cheat it.

The commit is here:

https://github.com/tsegismont/hawkular-metrics/commit/e4faf1bed71bbeb1b40d58dc3e0a10a3ea73a526

Comments?


More information about the hawkular-dev mailing list