Describe REST API related features in the Gerrit 2.5 release notes

Change-Id: I2c6c05609d64971185068ee2c8c22791bc3acec7
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2012-07-18 14:58:40 +02:00
parent f5a77336cc
commit d089fc4bba
2 changed files with 43 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ supporting some ad-hoc scripting use cases.
Protocol Details Protocol Details
---------------- ----------------
[[authentication]]
Authentication Authentication
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
By default all REST endpoints assume anonymous access and filter By default all REST endpoints assume anonymous access and filter
@@ -20,6 +21,7 @@ Gerrit by default uses HTTP digest authentication. To authenticate,
prefix the endpoint URL with `/a/`. For example to authenticate to prefix the endpoint URL with `/a/`. For example to authenticate to
`/projects/` request URL `/a/projects/`. `/projects/` request URL `/a/projects/`.
[[output]]
Output Format Output Format
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Most APIs return text format by default. JSON can be requested Most APIs return text format by default. JSON can be requested
@@ -147,6 +149,7 @@ and accepts the same options as query parameters.
} }
---- ----
[[suggest-projects]]
The `/projects/` URL also accepts a prefix string as part of the URL. The `/projects/` URL also accepts a prefix string as part of the URL.
This limits the results to those projects that start with the specified This limits the results to those projects that start with the specified
prefix. prefix.

View File

@@ -213,3 +213,43 @@ because it was dynamically installed or reloaded by an administrator.
* link:../Documentation/dev-plugins.html#getting-started[Maven * link:../Documentation/dev-plugins.html#getting-started[Maven
archetype for creating gerrit plugin projects] archetype for creating gerrit plugin projects]
REST API
~~~~~~~~
Gerrit now supports a REST like API available over HTTP. The API is
suitable for automated tools to build upon, as well as supporting some
ad-hoc scripting use cases.
* link:../Documentation/rest-api.html[Documentation of the REST API]
* Support REST endpoints to
** link:../Documentation/rest-api.html#changes[query changes]
** link:../Documentation/rest-api.html#projects[list projects]
** link:../Documentation/rest-api.html#suggest-projects[suggest
projects]
** link:../Documentation/rest-api.html#accounts_self_capabilities[query
the global capabilities of the calling user]
* Support link:../Documentation/rest-api.html#authentication[anonymous
and authenticated access] to the REST endpoints
* Support link:../Documentation/rest-api.html#output[JSON output
format] for the REST endpoints
The new REST API is used from the Gerrit WebUI.
Some of the methods from the old internal JSON-RPC interface were
completely replaced by the new REST API and got deleted:
* `ProjectAdminService.visibleProjects(AsyncCallback<ProjectList>)`
* `ProjectAdminService.suggestParentCandidates(AsyncCallback<List<Project>>)`
* `ChangeListService.myStarredChangeIds(AsyncCallback<Set<Change.Id>>)`
* `ChangeListService.allQueryNext(String, String, int, AsyncCallback<SingleListChangeInfo>)`
* `ChangeListService.allQueryPrev(String, String, int, AsyncCallback<SingleListChangeInfo>)`
* `ChangeListService.forAccount(Account.Id, AsyncCallback<AccountDashboardInfo>)`
In addition the `/query` API has been deprecated. By default it is
still available but server administrators may disable it by setting
the link:../Documentation/config-gerrit.html#site.enableDeprecatedQuery[
`site.enableDeprecatedQuery`] parameter in the Gerrit config file. This
allows to enforce tools to move to the new API.