On Sat, May 17, 2014 at 10:17 AM, Andy G. <
andy.g...@gmail.com> wrote:
>
> Hey,
>
> Gerrit supports (currently) to different kinds of APIs: SSH and REST.
>
> As far as i know the SSH API was first and after some time the REST API was introduced.
>
> My question is quite simple:
> Which API is (from Gerrit's development side) preferred?
>
> Is the SSH api kind of "old" and deprecated? Or will there be additional commands, features, and so on for the SSH api as well?
The SSH interface is not deprecated, but it is also not receiving any
new features right now.
We want to export the entire REST API on SSH. We actually planned to
do this the same day we designed the REST API, but nobody has written
the code yet. I have suggested that such an interface would be similar
to RestApiServlet, which is a generic HTTP bridge into the REST API.
The SSH command parser could do something similar and build a generic
bridge in, making any REST API available over SSH as soon as it is
introduced to the server.
> Or is the REST API the "new kid in the block" and will be the main focus during Gerrit development?
The REST API is very much the main focus of development. Many SSH
commands are being reimplemented under the covers in terms of the REST
API. This is already true for `gerrit review` for example.
Unfortunately that automatic SSH->REST API glue is missing, where we
have automatic HTTP->REST API glue already working.
> Is there a official statement from a Gerrit dev regarding this topic?
See above. :)
> You might asking why i am interested in.
> I write a tool to extract information via Gerrit's API to analyze them. Currently this tool supports only SSH API. But i want to rebuild it with REST support.
The REST API will be supported for a long time on HTTP. We want to
also expose it on SSH, in case the caller prefers SSH authentication.
But the code has not been implemented. But we would be interested to
see a patch to supply it. :)