362b14d11d
At the moment only the Gerrit administrators can list the installed plugins. However which plugins are installed may be also interesting to project owners and users because they want to know which functionality is available to them. Hiding the 'Plugins' > 'Installed' menu is bad since this screen is the entry point to the documentation of the installed plugins. This documentation may be relevant to normal users. Since being able to see the list of installed plugin may be considered as security risk, by default still only administrators are able to list them, but now the new capability allows to assign this permission also to other users. Change-Id: Ifed8ad76354b9a19e8c79edb0c965249b162fdfd Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
226 lines
5.0 KiB
Plaintext
226 lines
5.0 KiB
Plaintext
= Gerrit Code Review - /config/ REST API
|
|
|
|
This page describes the config related REST endpoints.
|
|
Please also take note of the general information on the
|
|
link:rest-api.html[REST API].
|
|
|
|
[[config-endpoints]]
|
|
Config Endpoints
|
|
---------------
|
|
|
|
[[get-version]]
|
|
=== Get Version
|
|
--
|
|
'GET /config/server/version'
|
|
--
|
|
|
|
Returns the version of the Gerrit server.
|
|
|
|
.Request
|
|
----
|
|
GET /config/server/version HTTP/1.0
|
|
----
|
|
|
|
.Response
|
|
----
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json;charset=UTF-8
|
|
|
|
)]}'
|
|
"2.7"
|
|
----
|
|
|
|
[[list-capabilities]]
|
|
=== List Capabilities
|
|
--
|
|
'GET /config/server/capabilities'
|
|
--
|
|
|
|
Lists the capabilities that are available in the system. There are two
|
|
kinds of capabilities: core and plugin-owned capabilities.
|
|
|
|
As result a map of link:#capability-info[CapabilityInfo] entities is
|
|
returned.
|
|
|
|
The entries in the map are sorted by capability ID.
|
|
|
|
.Request
|
|
----
|
|
GET /config/server/capabilities/ HTTP/1.0
|
|
----
|
|
|
|
.Response
|
|
----
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json;charset=UTF-8
|
|
|
|
)]}'
|
|
{
|
|
"accessDatabase": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "accessDatabase",
|
|
"name": "Access Database"
|
|
},
|
|
"administrateServer": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "administrateServer",
|
|
"name": "Administrate Server"
|
|
},
|
|
"createAccount": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "createAccount",
|
|
"name": "Create Account"
|
|
},
|
|
"createGroup": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "createGroup",
|
|
"name": "Create Group"
|
|
},
|
|
"createProject": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "createProject",
|
|
"name": "Create Project"
|
|
},
|
|
"emailReviewers": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "emailReviewers",
|
|
"name": "Email Reviewers"
|
|
},
|
|
"flushCaches": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "flushCaches",
|
|
"name": "Flush Caches"
|
|
},
|
|
"killTask": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "killTask",
|
|
"name": "Kill Task"
|
|
},
|
|
"priority": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "priority",
|
|
"name": "Priority"
|
|
},
|
|
"queryLimit": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "queryLimit",
|
|
"name": "Query Limit"
|
|
},
|
|
"runGC": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "runGC",
|
|
"name": "Run Garbage Collection"
|
|
},
|
|
"streamEvents": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "streamEvents",
|
|
"name": "Stream Events"
|
|
},
|
|
"viewCaches": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "viewCaches",
|
|
"name": "View Caches"
|
|
},
|
|
"viewConnections": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "viewConnections",
|
|
"name": "View Connections"
|
|
},
|
|
"viewPlugins": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "viewPlugins",
|
|
"name": "View Plugins"
|
|
},
|
|
"viewQueue": {
|
|
"kind": "gerritcodereview#capability",
|
|
"id": "viewQueue",
|
|
"name": "View Queue"
|
|
}
|
|
}
|
|
----
|
|
|
|
[[get-top-menus]]
|
|
=== Get Top Menus
|
|
--
|
|
'GET /config/server/top-menus'
|
|
--
|
|
|
|
Returns the list of additional top menu entries.
|
|
|
|
.Request
|
|
----
|
|
GET /config/server/top-menus HTTP/1.0
|
|
----
|
|
|
|
As response a list of the additional top menu entries as
|
|
link:#top-menu-entry-info[TopMenuEntryInfo] entities is returned.
|
|
|
|
.Response
|
|
----
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json;charset=UTF-8
|
|
|
|
)]}'
|
|
[
|
|
{
|
|
"name": "Top Menu Entry",
|
|
"items": [
|
|
{
|
|
"url": "http://gerrit.googlecode.com/",
|
|
"name": "Gerrit",
|
|
"target": "_blank"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
----
|
|
|
|
|
|
[[json-entities]]
|
|
== JSON Entities
|
|
|
|
[[capability-info]]
|
|
=== CapabilityInfo
|
|
The `CapabilityInfo` entity contains information about a capability.
|
|
|
|
[options="header",width="50%",cols="1,6"]
|
|
|=================================
|
|
|Field Name |Description
|
|
|`kind` |`gerritcodereview#capability`
|
|
|`id` |capability ID
|
|
|`name` |capability name
|
|
|=================================
|
|
|
|
[[top-menu-entry-info]]
|
|
=== TopMenuEntryInfo
|
|
The `TopMenuEntryInfo` entity contains information about a top menu
|
|
entry.
|
|
|
|
[options="header",width="50%",cols="1,6"]
|
|
|=================================
|
|
|Field Name |Description
|
|
|`name` |Name of the top menu entry.
|
|
|`items` |List of link:#top-menu-item-info[menu items].
|
|
|=================================
|
|
|
|
[[top-menu-item-info]]
|
|
=== TopMenuItemInfo
|
|
The `TopMenuItemInfo` entity contains information about a menu item in
|
|
a top menu entry.
|
|
|
|
[options="header",width="50%",cols="1,^1,5"]
|
|
|========================
|
|
|Field Name ||Description
|
|
|`url` ||The URL of the menu item link.
|
|
|`name` ||The name of the menu item.
|
|
|`target` ||Target attribute of the menu item link.
|
|
|`id` |optional|The `id` attribute of the menu item link.
|
|
|========================
|
|
|
|
GERRIT
|
|
------
|
|
Part of link:index.html[Gerrit Code Review]
|
|
|
|
SEARCHBOX
|
|
---------
|