[
https://issues.apache.org/jira/browse/QPID-7773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173385#comment-16173385
]
Lorenz Quack commented on QPID-7773:
------------------------------------
I agree with the approach laid out in [Keith's first
comment|https://issues.apache.org/jira/browse/QPID-7773?focusedCommentId=16107142&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16107142]
with the following addition (which is currently implemented)
bq. if a URL uniquely does not identify a single object e.g /queue or
/virtualhost/myvhn, a list must result *unless the specified parent hierarchy
(in the second example "myvhn") itself cannot be found in which case 404 should
be returned*
Unfortunately, the third point
bq. if a URL uniquely identifies a single object is qualified by a filter e..g.
/queue/vhn/vh/myqueue?type=standard, if the filter matches, the object should
be returned otherwise a 404 should result
is not implemented in the specified way. If the filter matches I get a list and
if it does not I get a 200 with an empty list.
> REST API queries that identify a single object by its full path should return
> a object rather than a list.
> ----------------------------------------------------------------------------------------------------------
>
> Key: QPID-7773
> URL: https://issues.apache.org/jira/browse/QPID-7773
> Project: Qpid
> Issue Type: Improvement
> Components: Java Broker
> Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Currently if I GET for, say a queue, by the object's full path
> {{/queue/vhn/vh/myqueue}}, I get a JSON list contain the queue object, rather
> than an object directly. This makes the REST API's abstraction inconsistent:
> I PUT a queue as an object, but GET gives me a list.
> The REST API should be returning a list only in those situations where a
> multiple object response could arise e.g. {{/queue/vhn/vh}}, wildcards or
> filtering.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]