[rabbitmq-discuss] Additional fields returned via /api/overview?
tim at rabbitmq.com
Sat Dec 29 01:44:00 GMT 2012
On 28 Dec 2012, at 18:58, Matt Pietrek wrote:
> > How would you like to see that information presented?
> The page is fine for understanding what requests I can make but it doesn't at all cover what responses are expected.
> Thus, in order to see if a particular request is going to provide what I need, I have to construct a call and examine the output fields. It would be nice if there was a schema definition for what the response look like. JSON is fine for my needs - I don't know about others.
Well JSON schema is probably a non-starter as it's not formally settled into a 1.0 spec yet AFAIK. I suppose we *could* serve up a list of fields and mark them as mandatory or optional as well as providing their data types.
> An interesting twist on the above is also that in some circumstances, not all data is returned for a given request. I'm specifically thinking about the case where the 'stats' database isn't available, so only a subset of the fields were returned when querying queue stats (I think I'm recalling the exact scenario correctly.)
I can see why that'd be annoying.
> A tiny bit more background - I'm starting to write tooling that will work against both 2.8 and 3.0 versions, so I need to query which version of the server I'm talking to. I initially queried a 3.0.1 instance for /api/overview and found the "rabbitmq_version" element. Great! So I coded that up in my tooling, and was then surprised when I didn't find that element when querying a 2.8.7 instance.
> Is this normal? Correct? Who knows? I have no schema reference to consult. :-)
Fair point, though I suspect we'll end up improving the documentation rather than coming up with a way of providing a reference schema. I could be wrong though. :)
More information about the rabbitmq-discuss