summaryrefslogtreecommitdiffstats
path: root/Documentation/rest-api-documentation.txt
blob: 0a7ff16a8c7ec4925f14d6ece96a3e85b382271a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
= Gerrit Code Review - /Documentation/ REST API

This page describes the documentation search related REST endpoints.
Please also take note of the general information on the
link:rest-api.html[REST API].

Please note that this feature is only usable with documentation built-in.
You'll need to
`bazel build withdocs`
or
`bazel build release`
to test this feature.

[[documentation-endpoints]]
== Documentation Search Endpoints

[[search-documentation]]
=== Search Documentation
--
'GET /Documentation/'
--

With `q` parameter, search our documentation index for the terms.

A list of link:#doc-result[DocResult] entities is returned describing the
results.

.Request
----
  GET /Documentation/?q=test HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json; charset=UTF-8

  )]}'
  [
    {
      "title": "Gerrit Code Review - REST API Developers\u0027 Notes",
      "url": "Documentation/dev-rest-api.html"
    },
    {
      "title": "Gerrit Code Review - REST API",
      "url": "Documentation/rest-api.html"
    },
    {
      "title": "Gerrit Code Review - JavaScript API",
      "url": "Documentation/js-api.html"
    },
    {
      "title": "Gerrit Code Review - /plugins/ REST API",
      "url": "Documentation/rest-api-plugins.html"
    },
    {
      "title": "Gerrit Code Review - /config/ REST API",
      "url": "Documentation/rest-api-config.html"
    },
    {
      "title": "Gerrit Code Review for Git",
      "url": "Documentation/index.html"
    },
    {
      "title": "Gerrit Code Review - /access/ REST API",
      "url": "Documentation/rest-api-access.html"
    },
    {
      "title": "Gerrit Code Review - Plugin Development",
      "url": "Documentation/dev-plugins.html"
    },
    {
      "title": "Gerrit Code Review - Developer Setup",
      "url": "Documentation/dev-readme.html"
    },
    {
      "title": "Gerrit Code Review - Hooks",
      "url": "Documentation/config-hooks.html"
    },
    {
      "title": "Gerrit Code Review - /groups/ REST API",
      "url": "Documentation/rest-api-groups.html"
    },
    {
      "title": "Gerrit Code Review - /accounts/ REST API",
      "url": "Documentation/rest-api-accounts.html"
    },
    {
      "title": "Gerrit Code Review - /projects/ REST API",
      "url": "Documentation/rest-api-documentation.html"
    },
    {
      "title": "Gerrit Code Review - /projects/ REST API",
      "url": "Documentation/rest-api-projects.html"
    },
    {
      "title": "Gerrit Code Review - Prolog Submit Rules Cookbook",
      "url": "Documentation/prolog-cookbook.html"
    },
    {
      "title": "Gerrit Code Review - /changes/ REST API",
      "url": "Documentation/rest-api-changes.html"
    },
    {
      "title": "Gerrit Code Review - Configuration",
      "url": "Documentation/config-gerrit.html"
    },
    {
      "title": "Gerrit Code Review - Access Controls",
      "url": "Documentation/access-control.html"
    },
    {
      "title": "Gerrit Code Review - Licenses",
      "url": "Documentation/licenses.html"
    }
  ]
----

.Query documentation
****
get::/Documentation/?q=keyword
****


[[json-entities]]
== JSON Entities

[[doc-result]]
=== DocResult
The `DocResult` entity contains information about a document.

[options="header",cols="1,^2,4"]
|=========================
|Field Name  ||Description
|`title`     ||The title of the document.
|`url`       ||The URL of the document.
|=========================


GERRIT
------
Part of link:index.html[Gerrit Code Review]

SEARCHBOX
---------