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