Am 11.02.2015 um 14:23 schrieb Viliam Rockai
<vrockai(a)redhat.com>:
Hi,
I'm looking at hawkular-inventory and I've got several comments (liveoak
legacy) which could apply on other rest endpoints, too:
1. I think it would be easier to use/get if we make it more
hierarchical. That means; instead of using two distinct URLs (resources
vs. resource) for lists (/hawkular/inventory/rest-test/resources/) and
entities (/hawkular/inventory/rest-test/resource/x1422733176502), we use
only one (/hawkular/inventory/rest-test/resources/x1422733176502).
This is a good question/suggestion. I tried to follow the pattern of <foo>S
for list + creation
and <foo>/x for identifying individual objects - sort of like in natural language.
2. Sometimes, in the docs, attribute called "name" is used,
and referred
to, as an "id". Would it be possible and make sense to choose just one
notation and use it in the representation?
Yes. I think we may need some more overall cleanup as soon as we know
more about some terms and semantics we want to use.
3. Usage of methods: When you want to create a metric, you use the PUT
method. What about unifying methods in some commonly used manner. Like
post for create, put for edit?
I guess you are right here. I used put instead of post for the metrics, as they are
sort of dependent objects.
Heiko