Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - /plugins/ REST API |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 2 | |
| 3 | This page describes the plugin related REST endpoints. |
| 4 | Please also take note of the general information on the |
| 5 | link:rest-api.html[REST API]. |
| 6 | |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 7 | [[plugin-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8 | == Plugin Endpoints |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 9 | |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 10 | Gerrit REST endpoints for installed plugins are available under |
| 11 | '/plugins/link:#plugin-id[\{plugin-id\}]/gerrit~<endpoint-id>'. |
| 12 | The `gerrit~` prefix ensures that the Gerrit REST endpoints for plugins |
| 13 | do not clash with any REST endpoint that a plugin may offer under its |
| 14 | namespace. |
| 15 | |
| 16 | |
| 17 | [[list-plugins]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 18 | === List Plugins |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 19 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 20 | 'GET /plugins/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 21 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 22 | |
| 23 | Lists the plugins installed on the Gerrit server. Only the enabled |
| 24 | plugins are returned unless the `all` option is specified. |
| 25 | |
Edwin Kempin | 362b14d1 | 2014-05-09 14:18:12 +0200 | [diff] [blame] | 26 | To be allowed to see the installed plugins, a user must be a member of |
| 27 | a group that is granted the 'View Plugins' capability or the |
| 28 | 'Administrate Server' capability. |
| 29 | |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 30 | As result a map is returned that maps the plugin IDs to |
| 31 | link:#plugin-info[PluginInfo] entries. The entries in the map are sorted |
| 32 | by plugin ID. |
| 33 | |
| 34 | .Request |
| 35 | ---- |
David Pursehouse | 9172702 | 2017-07-28 14:13:18 +0100 | [diff] [blame] | 36 | GET /plugins/ HTTP/1.0 |
| 37 | ---- |
| 38 | |
| 39 | .Response |
| 40 | ---- |
| 41 | HTTP/1.1 200 OK |
| 42 | Content-Disposition: attachment |
| 43 | Content-Type: application/json; charset=UTF-8 |
| 44 | |
| 45 | )]}' |
| 46 | { |
| 47 | "delete-project": { |
| 48 | "id": "delete-project", |
| 49 | "index_url": "plugins/delete-project/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 50 | "filename": "delete-project.jar", |
Christian Aistleitner | c3afed6 | 2020-05-31 09:42:52 +0200 | [diff] [blame] | 51 | "api_version": "2.9.3-SNAPSHOT", |
David Pursehouse | 9172702 | 2017-07-28 14:13:18 +0100 | [diff] [blame] | 52 | "version": "2.9-SNAPSHOT" |
| 53 | } |
| 54 | } |
| 55 | ---- |
| 56 | |
| 57 | [[plugin-options]] |
| 58 | ==== Plugin Options |
| 59 | All(a):: |
| 60 | List all plugins including those that are disabled. |
| 61 | |
| 62 | .Request |
| 63 | ---- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 64 | GET /plugins/?all HTTP/1.0 |
| 65 | ---- |
| 66 | |
| 67 | .Response |
| 68 | ---- |
| 69 | HTTP/1.1 200 OK |
| 70 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 71 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 72 | |
| 73 | )]}' |
| 74 | { |
| 75 | "delete-project": { |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 76 | "id": "delete-project", |
David Ostrovsky | 83c7986 | 2013-12-05 21:40:36 +0100 | [diff] [blame] | 77 | "index_url": "plugins/delete-project/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 78 | "filename": "delete-project.jar", |
Colby Ranger | 4d3226c | 2013-12-09 09:01:42 -0800 | [diff] [blame] | 79 | "version": "2.9-SNAPSHOT" |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 80 | }, |
| 81 | "reviewers-by-blame": { |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 82 | "id": "reviewers-by-blame", |
David Ostrovsky | 83c7986 | 2013-12-05 21:40:36 +0100 | [diff] [blame] | 83 | "index_url": "plugins/reviewers-by-blame/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 84 | "filename": "reviewers-by-blame.jar", |
David Pursehouse | 62864b7 | 2013-10-17 23:05:08 +0900 | [diff] [blame] | 85 | "version": "2.9-SNAPSHOT", |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 86 | "disabled": true |
Colby Ranger | 4d3226c | 2013-12-09 09:01:42 -0800 | [diff] [blame] | 87 | } |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 88 | } |
| 89 | ---- |
| 90 | |
David Pursehouse | 7f577a9 | 2017-07-27 17:32:28 +0100 | [diff] [blame] | 91 | Limit(n):: |
| 92 | Limit the number of plugins to be included in the results. |
| 93 | + |
| 94 | Query the first plugin in the plugin list: |
| 95 | + |
| 96 | .Request |
| 97 | ---- |
| 98 | GET /plugins/?n=1 HTTP/1.0 |
| 99 | ---- |
| 100 | + |
| 101 | .Response |
| 102 | ---- |
| 103 | HTTP/1.1 200 OK |
| 104 | Content-Disposition: attachment |
| 105 | Content-Type: application/json; charset=UTF-8 |
| 106 | |
| 107 | )]}' |
| 108 | { |
| 109 | "delete-project": { |
| 110 | "id": "delete-project", |
| 111 | "index_url": "plugins/delete-project/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 112 | "filename": "delete-project.jar", |
David Pursehouse | 7f577a9 | 2017-07-27 17:32:28 +0100 | [diff] [blame] | 113 | "version": "2.9-SNAPSHOT" |
| 114 | } |
| 115 | } |
| 116 | ---- |
| 117 | |
David Pursehouse | 68d975b | 2017-07-27 22:14:38 +0100 | [diff] [blame] | 118 | Prefix(p):: |
| 119 | Limit the results to those plugins that start with the specified |
| 120 | prefix. |
| 121 | + |
| 122 | The match is case sensitive. May not be used together with `m` or `r`. |
| 123 | + |
| 124 | List all plugins that start with `delete`: |
| 125 | + |
| 126 | .Request |
| 127 | ---- |
| 128 | GET /plugins/?p=delete HTTP/1.0 |
| 129 | ---- |
| 130 | + |
| 131 | .Response |
| 132 | ---- |
| 133 | HTTP/1.1 200 OK |
| 134 | Content-Disposition: attachment |
| 135 | Content-Type: application/json; charset=UTF-8 |
| 136 | |
| 137 | )]}' |
| 138 | { |
| 139 | "delete-project": { |
| 140 | "id": "delete-project", |
| 141 | "index_url": "plugins/delete-project/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 142 | "filename": "delete-project.jar", |
David Pursehouse | 68d975b | 2017-07-27 22:14:38 +0100 | [diff] [blame] | 143 | "version": "2.9-SNAPSHOT" |
| 144 | } |
| 145 | } |
| 146 | ---- |
| 147 | + |
| 148 | E.g. this feature can be used by suggestion client UI's to limit results. |
| 149 | |
| 150 | Regex(r):: |
| 151 | Limit the results to those plugins that match the specified regex. |
| 152 | + |
| 153 | Boundary matchers '^' and '$' are implicit. For example: the regex 'test.*' will |
| 154 | match any plugins that start with 'test' and regex '.*test' will match any |
| 155 | project that end with 'test'. |
| 156 | + |
| 157 | The match is case sensitive. May not be used together with `m` or `p`. |
| 158 | + |
| 159 | List all plugins that match regex `some.*plugin`: |
| 160 | + |
| 161 | .Request |
| 162 | ---- |
| 163 | GET /plugins/?r=some.*plugin HTTP/1.0 |
| 164 | ---- |
| 165 | + |
| 166 | .Response |
| 167 | ---- |
| 168 | HTTP/1.1 200 OK |
| 169 | Content-Disposition: attachment |
| 170 | Content-Type: application/json; charset=UTF-8 |
| 171 | |
| 172 | )]}' |
| 173 | { |
| 174 | "some-plugin": { |
| 175 | "id": "some-plugin", |
| 176 | "index_url": "plugins/some-plugin/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 177 | "filename": "some-plugin.jar", |
David Pursehouse | 68d975b | 2017-07-27 22:14:38 +0100 | [diff] [blame] | 178 | "version": "2.9-SNAPSHOT" |
| 179 | }, |
| 180 | "some-other-plugin": { |
| 181 | "id": "some-other-plugin", |
| 182 | "index_url": "plugins/some-other-plugin/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 183 | "filename": "some-other-plugin.jar", |
David Pursehouse | 68d975b | 2017-07-27 22:14:38 +0100 | [diff] [blame] | 184 | "version": "2.9-SNAPSHOT" |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | ---- |
David Pursehouse | 7f577a9 | 2017-07-27 17:32:28 +0100 | [diff] [blame] | 189 | |
| 190 | Skip(S):: |
| 191 | Skip the given number of plugins from the beginning of the list. |
| 192 | + |
| 193 | Query the second plugin in the plugin list: |
| 194 | + |
| 195 | .Request |
| 196 | ---- |
| 197 | GET /plugins/?all&n=1&S=1 HTTP/1.0 |
| 198 | ---- |
| 199 | + |
| 200 | .Response |
| 201 | ---- |
| 202 | HTTP/1.1 200 OK |
| 203 | Content-Disposition: attachment |
| 204 | Content-Type: application/json; charset=UTF-8 |
| 205 | |
| 206 | )]}' |
| 207 | { |
| 208 | "reviewers-by-blame": { |
| 209 | "id": "reviewers-by-blame", |
| 210 | "index_url": "plugins/reviewers-by-blame/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 211 | "filename": "reviewers-by-blame.jar", |
David Pursehouse | 7f577a9 | 2017-07-27 17:32:28 +0100 | [diff] [blame] | 212 | "version": "2.9-SNAPSHOT", |
| 213 | "disabled": true |
| 214 | } |
| 215 | } |
| 216 | ---- |
| 217 | |
David Pursehouse | 68d975b | 2017-07-27 22:14:38 +0100 | [diff] [blame] | 218 | Substring(m):: |
| 219 | Limit the results to those plugins that match the specified substring. |
| 220 | + |
| 221 | The match is case insensitive. May not be used together with `r` or `p`. |
| 222 | + |
| 223 | List all plugins that match substring `project`: |
| 224 | + |
| 225 | .Request |
| 226 | ---- |
| 227 | GET /plugins/?m=project HTTP/1.0 |
| 228 | ---- |
| 229 | + |
| 230 | .Response |
| 231 | ---- |
| 232 | HTTP/1.1 200 OK |
| 233 | Content-Disposition: attachment |
| 234 | Content-Type: application/json; charset=UTF-8 |
| 235 | |
| 236 | )]}' |
| 237 | { |
| 238 | "delete-project": { |
| 239 | "id": "delete-project", |
| 240 | "index_url": "plugins/delete-project/", |
David Pursehouse | 4a64821 | 2017-08-04 21:03:28 +0200 | [diff] [blame] | 241 | "filename": "delete-project.jar", |
David Pursehouse | 68d975b | 2017-07-27 22:14:38 +0100 | [diff] [blame] | 242 | "version": "2.9-SNAPSHOT" |
| 243 | } |
| 244 | } |
| 245 | ---- |
David Pursehouse | 7f577a9 | 2017-07-27 17:32:28 +0100 | [diff] [blame] | 246 | |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 247 | [[install-plugin]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 248 | === Install Plugin |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 249 | -- |
Guillaume Chauvel | c8fe65c | 2020-05-17 01:30:59 +0200 | [diff] [blame] | 250 | 'PUT /plugins/link:#plugin-id[\{plugin-id\}].jar' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 251 | -- |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 252 | |
| 253 | Installs a new plugin on the Gerrit server. If a plugin with the |
David Ostrovsky | 366ad0e | 2013-09-05 19:59:09 +0200 | [diff] [blame] | 254 | specified name already exists it is overwritten. Note: if the plugin |
| 255 | provides its own name in the MANIFEST file, then the plugin name from |
| 256 | the MANIFEST file has precedence over the \{plugin-id\} above. |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 257 | |
| 258 | The plugin jar can either be sent as binary data in the request body |
| 259 | or a URL to the plugin jar must be provided in the request body inside |
| 260 | a link:#plugin-input[PluginInput] entity. |
| 261 | |
| 262 | .Request |
| 263 | ---- |
Guillaume Chauvel | c8fe65c | 2020-05-17 01:30:59 +0200 | [diff] [blame] | 264 | PUT /plugins/delete-project.jar HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 265 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 266 | |
| 267 | { |
| 268 | "url": "file:///gerrit/plugins/delete-project/delete-project-2.8.jar" |
| 269 | } |
| 270 | ---- |
| 271 | |
| 272 | To provide the plugin jar as binary data in the request body the |
| 273 | following curl command can be used: |
| 274 | |
| 275 | ---- |
Guillaume Chauvel | c8fe65c | 2020-05-17 01:30:59 +0200 | [diff] [blame] | 276 | curl --user admin:TNNuLkWsIV8w -X PUT -H "Content-Type:application/octet-stream" --data-binary @delete-project.jar 'http://gerrit:8080/a/plugins/delete-project.jar' |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 277 | ---- |
| 278 | |
| 279 | As response a link:#plugin-info[PluginInfo] entity is returned that |
| 280 | describes the plugin. |
| 281 | |
| 282 | .Response |
| 283 | ---- |
| 284 | HTTP/1.1 201 Created |
| 285 | Content-Disposition: attachment |
Guillaume Chauvel | c8fe65c | 2020-05-17 01:30:59 +0200 | [diff] [blame] | 286 | Content-Type: application/json;charset=utf-8 |
| 287 | Content-Length: 150 |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 288 | |
| 289 | )]}' |
| 290 | { |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 291 | "id": "delete-project", |
Guillaume Chauvel | c8fe65c | 2020-05-17 01:30:59 +0200 | [diff] [blame] | 292 | "version": "v2.16-221-g35bb8bbac4", |
| 293 | "index_url": "plugins/delete-project/", |
| 294 | "filename": "delete-project.jar" |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 295 | } |
| 296 | ---- |
| 297 | |
| 298 | If an existing plugin was overwritten the response is "`200 OK`". |
| 299 | |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 300 | [[get-plugin-status]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 301 | === Get Plugin Status |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 302 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 303 | 'GET /plugins/link:#plugin-id[\{plugin-id\}]/gerrit~status' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 304 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 305 | |
| 306 | Retrieves the status of a plugin on the Gerrit server. |
| 307 | |
| 308 | .Request |
| 309 | ---- |
| 310 | GET /plugins/delete-project/gerrit~status HTTP/1.0 |
| 311 | ---- |
| 312 | |
| 313 | As response a link:#plugin-info[PluginInfo] entity is returned that |
| 314 | describes the plugin. |
| 315 | |
| 316 | .Response |
| 317 | ---- |
| 318 | HTTP/1.1 200 OK |
| 319 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 320 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 321 | |
| 322 | )]}' |
| 323 | { |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 324 | "id": "delete-project", |
| 325 | "version": "2.8" |
| 326 | } |
| 327 | ---- |
| 328 | |
| 329 | [[enable-plugin]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 330 | === Enable Plugin |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 331 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 332 | 'POST /plugins/link:#plugin-id[\{plugin-id\}]/gerrit~enable' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 333 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 334 | |
| 335 | Enables a plugin on the Gerrit server. |
| 336 | |
| 337 | .Request |
| 338 | ---- |
| 339 | POST /plugins/delete-project/gerrit~enable HTTP/1.0 |
| 340 | ---- |
| 341 | |
| 342 | As response a link:#plugin-info[PluginInfo] entity is returned that |
| 343 | describes the plugin. |
| 344 | |
| 345 | .Response |
| 346 | ---- |
| 347 | HTTP/1.1 200 OK |
| 348 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 349 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 350 | |
| 351 | )]}' |
| 352 | { |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 353 | "id": "delete-project", |
| 354 | "version": "2.8" |
| 355 | } |
| 356 | ---- |
| 357 | |
| 358 | [[disable-plugin]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 359 | === Disable Plugin |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 360 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 361 | 'POST /plugins/link:#plugin-id[\{plugin-id\}]/gerrit~disable' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 362 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 363 | |
| 364 | OR |
| 365 | |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 366 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 367 | 'DELETE /plugins/link:#plugin-id[\{plugin-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 368 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 369 | |
| 370 | Disables a plugin on the Gerrit server. |
| 371 | |
| 372 | .Request |
| 373 | ---- |
| 374 | POST /plugins/delete-project/gerrit~disable HTTP/1.0 |
| 375 | ---- |
| 376 | |
| 377 | As response a link:#plugin-info[PluginInfo] entity is returned that |
| 378 | describes the plugin. |
| 379 | |
| 380 | .Response |
| 381 | ---- |
| 382 | HTTP/1.1 200 OK |
| 383 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 384 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 385 | |
| 386 | )]}' |
| 387 | { |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 388 | "id": "delete-project", |
| 389 | "version": "2.8", |
| 390 | "disabled": true |
| 391 | } |
| 392 | ---- |
| 393 | |
Saša Živkov | cae842e | 2019-05-13 14:38:20 +0200 | [diff] [blame] | 394 | Disabling of a link:config-gerrit.html#plugins.mandatory[mandatory plugin] |
| 395 | is rejected: |
| 396 | |
| 397 | .Request |
| 398 | ---- |
| 399 | DELETE /plugins/replication HTTP/1.0 |
| 400 | ---- |
| 401 | |
| 402 | .Response |
| 403 | ---- |
| 404 | HTTP/1.1 405 Method Not Allowed |
| 405 | Content-Disposition: attachment |
| 406 | Content-Type: application/json; charset=UTF-8 |
| 407 | |
| 408 | )]}' |
| 409 | Plugin replication is mandatory |
| 410 | ---- |
| 411 | |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 412 | [[reload-plugin]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 413 | === Reload Plugin |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 414 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 415 | 'POST /plugins/link:#plugin-id[\{plugin-id\}]/gerrit~reload' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 416 | -- |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 417 | |
| 418 | Reloads a plugin on the Gerrit server. |
| 419 | |
| 420 | .Request |
| 421 | ---- |
| 422 | POST /plugins/delete-project/gerrit~reload HTTP/1.0 |
| 423 | ---- |
| 424 | |
| 425 | As response a link:#plugin-info[PluginInfo] entity is returned that |
| 426 | describes the plugin. |
| 427 | |
| 428 | .Response |
| 429 | ---- |
| 430 | HTTP/1.1 200 OK |
| 431 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 432 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 433 | |
| 434 | )]}' |
| 435 | { |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 436 | "id": "delete-project", |
| 437 | "version": "2.8", |
| 438 | "disabled": true |
| 439 | } |
| 440 | ---- |
| 441 | |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 442 | |
| 443 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 444 | == IDs |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 445 | |
| 446 | [[plugin-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 447 | === \{plugin-id\} |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 448 | The ID of the plugin. |
| 449 | |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 450 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 451 | == JSON Entities |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 452 | |
| 453 | [[plugin-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 454 | === PluginInfo |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 455 | The `PluginInfo` entity describes a plugin. |
| 456 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 457 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 458 | |======================= |
Christian Aistleitner | c3afed6 | 2020-05-31 09:42:52 +0200 | [diff] [blame] | 459 | |Field Name ||Description |
| 460 | |`id` ||The ID of the plugin. |
| 461 | |`version` ||The version of the plugin. |
| 462 | |`api_version`|optional|The version of the Gerrit Api used by the plugin. |
| 463 | |`index_url` |optional|URL of the plugin's default page. |
| 464 | |`filename` |optional|The plugin's filename. |
| 465 | |`disabled` |not set if `false`|Whether the plugin is disabled. |
Edwin Kempin | 9de428c | 2013-09-02 14:44:21 +0200 | [diff] [blame] | 466 | |======================= |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 467 | |
| 468 | [[plugin-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 469 | === PluginInput |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 470 | The `PluginInput` entity describes a plugin that should be installed. |
| 471 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 472 | [options="header",cols="1,6"] |
Edwin Kempin | 36eeee2 | 2013-08-30 15:57:34 +0200 | [diff] [blame] | 473 | |====================== |
| 474 | |Field Name|Description |
| 475 | |`url` |URL to the plugin jar. |
| 476 | |====================== |
| 477 | |
| 478 | |
| 479 | GERRIT |
| 480 | ------ |
| 481 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 482 | |
| 483 | SEARCHBOX |
| 484 | --------- |