State of the API: REST and / or SSH? What is Gerrit's future?

888 views
Skip to first unread message

Andy G.

unread,
May 17, 2014, 1:17:18 PM5/17/14
to repo-d...@googlegroups.com
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?
Or is the REST API the "new kid in the block" and will be the main focus during Gerrit development?

Is there a official statement from a Gerrit dev regarding this topic?

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 answer of the questions above might got a effect on this development.

Some facts about this topic would be nice :)

Have a nice day!

Cheers,
Andy

Shawn Pearce

unread,
May 18, 2014, 8:33:55 PM5/18/14
to Andy G., repo-discuss
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. :)

Andy Grunwald

unread,
May 20, 2014, 3:42:32 PM5/20/14
to Shawn Pearce, repo-discuss
Thanks for this detailed answer.

If i get this correct:
* REST API is the main focus
* Long term goal: Make REST / HTTP functionality + Entites + Structure  available for SSH protocoll

Right?

Shawn Pearce

unread,
May 20, 2014, 5:11:14 PM5/20/14
to Andy Grunwald, repo-discuss
On Tue, May 20, 2014 at 12:42 PM, Andy Grunwald <andygr...@gmail.com> wrote:
Thanks for this detailed answer.

If i get this correct:
* REST API is the main focus
* Long term goal: Make REST / HTTP functionality + Entites + Structure  available for SSH protocoll

Right?

Yes. :)

Hassan Rom

unread,
Sep 23, 2022, 4:09:22 PM9/23/22
to Repo and Gerrit Discussion
Hello,

Just came across this thread. What's the status of making REST available through SSH? Any pointers to docs?

Thanks.

- Hassan

Edwin Kempin

unread,
Sep 27, 2022, 3:41:33 AM9/27/22
to Hassan Rom, Repo and Gerrit Discussion
On Fri, Sep 23, 2022 at 10:09 PM Hassan Rom <hass...@huda.my> wrote:
Hello,

Just came across this thread. What's the status of making REST available through SSH?
Sorry, there was no progress with this and AFAIK no work on this is planned either.
I don't think this situation will change any time soon, as nobody is interested enough in this to commit to doing the implementation work.
Google for example is not using the SSH API at all.
 
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/783ff25b-ae64-4e38-a603-9f9b2c5feddan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages