blob: 0defe6de3f5db8b04e7c7d4b1a007dc5e661beee [file] [log] [blame]
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -07001Gerrit Code Review - /Documentation/ REST API
2=============================================
3
4This page describes the documentation search related REST endpoints.
5Please also take note of the general information on the
6link:rest-api.html[REST API].
7
8Please note that this feature is only usable with documentation built-in.
9You'll need to
10`buck build :withdocs`
11or
12`buck build :release`
13to test this feature.
14
15[[documentation-endpoints]]
16Documentation Search Endpoints
17------------------------------
18
19[[search-documentation]]
20Search Documentation
21~~~~~~~~~~~~~~~~~~~~
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080022--
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070023'GET /Documentation/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080024--
Yuxuan 'fishy' Wangec4b06a2013-10-14 12:39:30 -070025
26With `q` parameter, search our documentation index for the terms.
27
28A list of link:#doc-result[DocResult] entities is returned describing the
29results.
30
31.Request
32----
33 GET /Documentation/?q=test HTTP/1.0
34----
35
36.Response
37----
38 HTTP/1.1 200 OK
39 Content-Disposition: attachment
40 Content-Type: application/json; charset=UTF-8
41
42 )]}'
43 [
44 {
45 "title": "Gerrit Code Review - REST API Developers\u0027 Notes",
46 "url": "Documentation/dev-rest-api.html"
47 },
48 {
49 "title": "Gerrit Code Review - REST API",
50 "url": "Documentation/rest-api.html"
51 },
52 {
53 "title": "Gerrit Code Review - JavaScript API",
54 "url": "Documentation/js-api.html"
55 },
56 {
57 "title": "Gerrit Code Review - /plugins/ REST API",
58 "url": "Documentation/rest-api-plugins.html"
59 },
60 {
61 "title": "Gerrit Code Review - /config/ REST API",
62 "url": "Documentation/rest-api-config.html"
63 },
64 {
65 "title": "Gerrit Code Review for Git",
66 "url": "Documentation/index.html"
67 },
68 {
69 "title": "Gerrit Code Review - /access/ REST API",
70 "url": "Documentation/rest-api-access.html"
71 },
72 {
73 "title": "Gerrit Code Review - Plugin Development",
74 "url": "Documentation/dev-plugins.html"
75 },
76 {
77 "title": "Gerrit Code Review - Developer Setup",
78 "url": "Documentation/dev-readme.html"
79 },
80 {
81 "title": "Gerrit Code Review - Hooks",
82 "url": "Documentation/config-hooks.html"
83 },
84 {
85 "title": "Change Screen - Introduction",
86 "url": "Documentation/intro-change-screen.html"
87 },
88 {
89 "title": "Gerrit Code Review - /groups/ REST API",
90 "url": "Documentation/rest-api-groups.html"
91 },
92 {
93 "title": "Gerrit Code Review - /accounts/ REST API",
94 "url": "Documentation/rest-api-accounts.html"
95 },
96 {
97 "title": "Gerrit Code Review - /projects/ REST API",
98 "url": "Documentation/rest-api-documentation.html"
99 },
100 {
101 "title": "Gerrit Code Review - /projects/ REST API",
102 "url": "Documentation/rest-api-projects.html"
103 },
104 {
105 "title": "Gerrit Code Review - Prolog Submit Rules Cookbook",
106 "url": "Documentation/prolog-cookbook.html"
107 },
108 {
109 "title": "Gerrit Code Review - /changes/ REST API",
110 "url": "Documentation/rest-api-changes.html"
111 },
112 {
113 "title": "Gerrit Code Review - Configuration",
114 "url": "Documentation/config-gerrit.html"
115 },
116 {
117 "title": "Gerrit Code Review - Access Controls",
118 "url": "Documentation/access-control.html"
119 },
120 {
121 "title": "Gerrit Code Review - Licenses",
122 "url": "Documentation/licenses.html"
123 }
124 ]
125----
126
127.Query documentation
128****
129get::/Documentation/?q=keyword
130****
131
132
133[[json-entities]]
134JSON Entities
135-------------
136
137[[doc-result]]
138DocResult
139~~~~~~~~~
140The `DocResult` entity contains information about a document.
141
142[options="header",width="50%",cols="1,^2,4"]
143|=========================
144|Field Name ||Description
145|`title` ||The title of the document.
146|`url` ||The URL of the document.
147|=========================
148
149
150GERRIT
151------
152Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700153
154SEARCHBOX
155---------