diff options
Diffstat (limited to 'Documentation/rest-api-plugins.txt')
-rw-r--r-- | Documentation/rest-api-plugins.txt | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/Documentation/rest-api-plugins.txt b/Documentation/rest-api-plugins.txt index 53f4bb5feb..938d101d8e 100644 --- a/Documentation/rest-api-plugins.txt +++ b/Documentation/rest-api-plugins.txt @@ -47,6 +47,7 @@ by plugin ID. "delete-project": { "id": "delete-project", "index_url": "plugins/delete-project/", + "filename": "delete-project.jar", "version": "2.9-SNAPSHOT" } } @@ -73,17 +74,175 @@ List all plugins including those that are disabled. "delete-project": { "id": "delete-project", "index_url": "plugins/delete-project/", + "filename": "delete-project.jar", "version": "2.9-SNAPSHOT" }, "reviewers-by-blame": { "id": "reviewers-by-blame", "index_url": "plugins/reviewers-by-blame/", + "filename": "reviewers-by-blame.jar", "version": "2.9-SNAPSHOT", "disabled": true } } ---- +Limit(n):: +Limit the number of plugins to be included in the results. ++ +Query the first plugin in the plugin list: ++ +.Request +---- + GET /plugins/?n=1 HTTP/1.0 +---- ++ +.Response +---- + HTTP/1.1 200 OK + Content-Disposition: attachment + Content-Type: application/json; charset=UTF-8 + + )]}' + { + "delete-project": { + "id": "delete-project", + "index_url": "plugins/delete-project/", + "filename": "delete-project.jar", + "version": "2.9-SNAPSHOT" + } + } +---- + +Prefix(p):: +Limit the results to those plugins that start with the specified +prefix. ++ +The match is case sensitive. May not be used together with `m` or `r`. ++ +List all plugins that start with `delete`: ++ +.Request +---- + GET /plugins/?p=delete HTTP/1.0 +---- ++ +.Response +---- + HTTP/1.1 200 OK + Content-Disposition: attachment + Content-Type: application/json; charset=UTF-8 + + )]}' + { + "delete-project": { + "id": "delete-project", + "index_url": "plugins/delete-project/", + "filename": "delete-project.jar", + "version": "2.9-SNAPSHOT" + } + } +---- ++ +E.g. this feature can be used by suggestion client UI's to limit results. + +Regex(r):: +Limit the results to those plugins that match the specified regex. ++ +Boundary matchers '^' and '$' are implicit. For example: the regex 'test.*' will +match any plugins that start with 'test' and regex '.*test' will match any +project that end with 'test'. ++ +The match is case sensitive. May not be used together with `m` or `p`. ++ +List all plugins that match regex `some.*plugin`: ++ +.Request +---- + GET /plugins/?r=some.*plugin HTTP/1.0 +---- ++ +.Response +---- + HTTP/1.1 200 OK + Content-Disposition: attachment + Content-Type: application/json; charset=UTF-8 + + )]}' + { + "some-plugin": { + "id": "some-plugin", + "index_url": "plugins/some-plugin/", + "filename": "some-plugin.jar", + "version": "2.9-SNAPSHOT" + }, + "some-other-plugin": { + "id": "some-other-plugin", + "index_url": "plugins/some-other-plugin/", + "filename": "some-other-plugin.jar", + "version": "2.9-SNAPSHOT" + } + } + +---- + +Skip(S):: +Skip the given number of plugins from the beginning of the list. ++ +Query the second plugin in the plugin list: ++ +.Request +---- + GET /plugins/?all&n=1&S=1 HTTP/1.0 +---- ++ +.Response +---- + HTTP/1.1 200 OK + Content-Disposition: attachment + Content-Type: application/json; charset=UTF-8 + + )]}' + { + "reviewers-by-blame": { + "id": "reviewers-by-blame", + "index_url": "plugins/reviewers-by-blame/", + "filename": "reviewers-by-blame.jar", + "version": "2.9-SNAPSHOT", + "disabled": true + } + } +---- + +Substring(m):: +Limit the results to those plugins that match the specified substring. ++ +The match is case insensitive. May not be used together with `r` or `p`. ++ +List all plugins that match substring `project`: ++ +.Request +---- + GET /plugins/?m=project HTTP/1.0 +---- ++ +.Response +---- + HTTP/1.1 200 OK + Content-Disposition: attachment + Content-Type: application/json; charset=UTF-8 + + )]}' + { + "delete-project": { + "id": "delete-project", + "index_url": "plugins/delete-project/", + "filename": "delete-project.jar", + "version": "2.9-SNAPSHOT" + } + } +---- + [[install-plugin]] === Install Plugin -- @@ -279,6 +438,7 @@ The `PluginInfo` entity describes a plugin. |`id` ||The ID of the plugin. |`version` ||The version of the plugin. |`index_url`|optional|URL of the plugin's default page. +|`filename` |optional|The plugin's filename. |`disabled` |not set if `false`|Whether the plugin is disabled. |======================= |