| Yuxuan 'fishy' Wang | ec4b06a | 2013-10-14 12:39:30 -0700 | [diff] [blame] | 1 | Gerrit Code Review - /Documentation/ REST API |
| 2 | ============================================= |
| 3 | |
| 4 | This page describes the documentation search related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
| 8 | Please note that this feature is only usable with documentation built-in. |
| 9 | You'll need to |
| 10 | `buck build :withdocs` |
| 11 | or |
| 12 | `buck build :release` |
| 13 | to test this feature. |
| 14 | |
| 15 | [[documentation-endpoints]] |
| 16 | Documentation Search Endpoints |
| 17 | ------------------------------ |
| 18 | |
| 19 | [[search-documentation]] |
| 20 | Search Documentation |
| 21 | ~~~~~~~~~~~~~~~~~~~~ |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame^] | 22 | -- |
| Yuxuan 'fishy' Wang | ec4b06a | 2013-10-14 12:39:30 -0700 | [diff] [blame] | 23 | 'GET /Documentation/' |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame^] | 24 | -- |
| Yuxuan 'fishy' Wang | ec4b06a | 2013-10-14 12:39:30 -0700 | [diff] [blame] | 25 | |
| 26 | With `q` parameter, search our documentation index for the terms. |
| 27 | |
| 28 | A list of link:#doc-result[DocResult] entities is returned describing the |
| 29 | results. |
| 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 | **** |
| 129 | get::/Documentation/?q=keyword |
| 130 | **** |
| 131 | |
| 132 | |
| 133 | [[json-entities]] |
| 134 | JSON Entities |
| 135 | ------------- |
| 136 | |
| 137 | [[doc-result]] |
| 138 | DocResult |
| 139 | ~~~~~~~~~ |
| 140 | The `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 | |
| 150 | GERRIT |
| 151 | ------ |
| 152 | Part of link:index.html[Gerrit Code Review] |
| Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 153 | |
| 154 | SEARCHBOX |
| 155 | --------- |