blob: e69750def9d6948b0bfeef5ecc0cc9eee74e0c04 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - /Documentation/ REST API
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -07002
3This page describes the documentation search related REST endpoints.
4Please also take note of the general information on the
5link:rest-api.html[REST API].
6
7Please note that this feature is only usable with documentation built-in.
8You'll need to
David Ostrovskyfdbfcad2016-11-15 06:35:29 -08009`bazel build withdocs`
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070010or
David Ostrovskyfdbfcad2016-11-15 06:35:29 -080011`bazel build release`
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070012to test this feature.
13
14[[documentation-endpoints]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080015== Documentation Search Endpoints
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070016
17[[search-documentation]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080018=== Search Documentation
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080019--
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070020'GET /Documentation/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080021--
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070022
23With `q` parameter, search our documentation index for the terms.
24
25A list of link:#doc-result[DocResult] entities is returned describing the
26results.
27
28.Request
29----
30 GET /Documentation/?q=test HTTP/1.0
31----
32
33.Response
34----
35 HTTP/1.1 200 OK
36 Content-Disposition: attachment
37 Content-Type: application/json; charset=UTF-8
38
39 )]}'
40 [
41 {
42 "title": "Gerrit Code Review - REST API Developers\u0027 Notes",
43 "url": "Documentation/dev-rest-api.html"
44 },
45 {
46 "title": "Gerrit Code Review - REST API",
47 "url": "Documentation/rest-api.html"
48 },
49 {
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070050 "title": "Gerrit Code Review - /plugins/ REST API",
51 "url": "Documentation/rest-api-plugins.html"
52 },
53 {
54 "title": "Gerrit Code Review - /config/ REST API",
55 "url": "Documentation/rest-api-config.html"
56 },
57 {
58 "title": "Gerrit Code Review for Git",
59 "url": "Documentation/index.html"
60 },
61 {
62 "title": "Gerrit Code Review - /access/ REST API",
63 "url": "Documentation/rest-api-access.html"
64 },
65 {
Ben Rohlfsda0a62b2021-04-26 17:02:19 +020066 "title": "Gerrit Code Review - Java Plugin Development",
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070067 "url": "Documentation/dev-plugins.html"
68 },
69 {
Ben Rohlfsda0a62b2021-04-26 17:02:19 +020070 "title": "Gerrit Code Review - JavaScript Plugin Development and API",
71 "url": "Documentation/pg-plugin-dev.html"
72 },
73 {
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070074 "title": "Gerrit Code Review - Developer Setup",
75 "url": "Documentation/dev-readme.html"
76 },
77 {
78 "title": "Gerrit Code Review - Hooks",
79 "url": "Documentation/config-hooks.html"
80 },
81 {
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070082 "title": "Gerrit Code Review - /groups/ REST API",
83 "url": "Documentation/rest-api-groups.html"
84 },
85 {
86 "title": "Gerrit Code Review - /accounts/ REST API",
87 "url": "Documentation/rest-api-accounts.html"
88 },
89 {
90 "title": "Gerrit Code Review - /projects/ REST API",
91 "url": "Documentation/rest-api-documentation.html"
92 },
93 {
94 "title": "Gerrit Code Review - /projects/ REST API",
95 "url": "Documentation/rest-api-projects.html"
96 },
97 {
98 "title": "Gerrit Code Review - Prolog Submit Rules Cookbook",
99 "url": "Documentation/prolog-cookbook.html"
100 },
101 {
102 "title": "Gerrit Code Review - /changes/ REST API",
103 "url": "Documentation/rest-api-changes.html"
104 },
105 {
106 "title": "Gerrit Code Review - Configuration",
107 "url": "Documentation/config-gerrit.html"
108 },
109 {
110 "title": "Gerrit Code Review - Access Controls",
111 "url": "Documentation/access-control.html"
112 },
113 {
114 "title": "Gerrit Code Review - Licenses",
115 "url": "Documentation/licenses.html"
116 }
117 ]
118----
119
120.Query documentation
121****
122get::/Documentation/?q=keyword
123****
124
125
126[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800127== JSON Entities
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -0700128
129[[doc-result]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800130=== DocResult
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -0700131The `DocResult` entity contains information about a document.
132
David Pursehouseae367192014-11-25 17:24:47 +0900133[options="header",cols="1,^2,4"]
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -0700134|=========================
135|Field Name ||Description
136|`title` ||The title of the document.
137|`url` ||The URL of the document.
138|=========================
139
140
141GERRIT
142------
143Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700144
145SEARCHBOX
146---------