 61698b14e0
			
		
	
	61698b14e0
	
	
	
		
			
			We previous use the section title style like: Section level 1 =============== Section level 2 --------------- Which have a problem in Asciidoctor that the number of "="s or "-"s must match the number of characters in the header exactly, as a result it's easy to make mistakes while changing the titles. Asciidoctor provides a better style like: = Section level 1 == Section level 2 So we switched to this style. Also fixed a bug in replace_macros.py, which will not cause any problem in the old style. Change-Id: I811dd7238735d98f662767c17086152cd69aea02
		
			
				
	
	
		
			151 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			151 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| = 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
 | |
| `buck build withdocs`
 | |
| or
 | |
| `buck 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": "Change Screen - Introduction",
 | |
|       "url": "Documentation/intro-change-screen.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",width="50%",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
 | |
| ---------
 |