Hi,
As we need clients to actually push data to our system (and that way to
get users & community), I've written one for the Python. I've tried to
follow what a normal contributor would do and just read the
documentation that's available. Short story - there isn't enough
documentation.
I don't think we reached a consensus yet where to push the client source
codes, so I haven't created a pull request for this and for that reason
haven't renamed the repository either. It is available from
https://github.com/burmanm/rhq-metrics-python-client with documentation.
I'll gladly take ideas, my Python most likely looks like some other
language written in Python syntax - but it works.
There are tests that trigger against the real hawkular-metrics server
(0.30.0-SNAPSHOT). Usually the Python client developers target a mocked
endpoint, but I decided to go after the real server as I believe our API
might still change and the documentation isn't a reliable reference
point. I tried to follow the documentation on
https://github.com/hawkular/hawkular-metrics/tree/master/api/metrics-api-...
but I had to revert in some cases to reading the source code on what was
really wanted, especially after receiving 400 / 500 error codes while
doing the testing (when the json looked like in the examples). I also
only created abilities that are defined on that page, as I have no idea
if rest of the undocumented REST APIs are actually there to stay or to
be removed.
Which brings me to the question, what parts of the API are stable at the
moment? There's counters and such which are not documented at all. We
have huge selection of endpoints for any client developer to implement,
perhaps too many of them. I can try to improve documentation, but even
then I would want to know what's going on. I heard alerts is getting
swagger-annotations, which is nice.
- Micke