Rest Search » History » Version 2
Takenori TAKAKI, 2021-07-14 09:34
| 1 | 1 | Go MAEDA | h1. Search |
|---|---|---|---|
| 2 | |||
| 3 | 2 | Takenori TAKAKI | {{>toc}} |
| 4 | |||
| 5 | h2. /search.:format |
||
| 6 | |||
| 7 | h3. GET |
||
| 8 | |||
| 9 | Returns the search results by the specified condition parameters. |
||
| 10 | |||
| 11 | +Parameters+: |
||
| 12 | |||
| 13 | * @offset@: skip this number of results in response (optional) |
||
| 14 | * @limit@: number of results in response (optional) |
||
| 15 | * @q@: query strings. enable to specify multiple values separated by a space " ". |
||
| 16 | |||
| 17 | Optional filters: |
||
| 18 | |||
| 19 | * @scope@: search scope condition |
||
| 20 | ** 'all': search all projects |
||
| 21 | ** 'my_project': search assigned projects |
||
| 22 | ** 'subprojects': include subproject when project spacified |
||
| 23 | * @all_words@: matched all query strings or not |
||
| 24 | * @titles_only@: matched only title or not |
||
| 25 | * @issues@: include Issues or not |
||
| 26 | * @news@: include News or not |
||
| 27 | * @documents@: include Documents or not |
||
| 28 | * @changesets@: include Changesets or not |
||
| 29 | * @wiki_pages@: include Wiki Pages or not |
||
| 30 | * @messages@: include Messages or not |
||
| 31 | * @projects@: include Projects or not |
||
| 32 | * @open_issues@: filterd by open issues. |
||
| 33 | * @attachments@: filterd by description and attachment |
||
| 34 | ** '0': seach only in description |
||
| 35 | ** '1': search by description and attachment |
||
| 36 | ** 'only': search only in attachment |
||
| 37 | |||
| 38 | +Examples+: |
||
| 39 | |||
| 40 | <pre> |
||
| 41 | GET /search.xml?q=query_string |
||
| 42 | |||
| 43 | Paging example: |
||
| 44 | GET /search.xml?q=query_string&offset=0&limit=100 |
||
| 45 | |||
| 46 | Filtering issues and wikis example: |
||
| 47 | GET /search.xml?q=issue_keyword wiki_keyword&issues=1&wiki_pages=1 |
||
| 48 | </pre> |
||
| 49 | |||
| 50 | +Response+: |
||
| 51 | |||
| 52 | <pre> |
||
| 53 | <results total_count="2" offset="0" limit="25" type="array"> |
||
| 54 | <result> |
||
| 55 | <id>5</id> |
||
| 56 | <title>Wiki: Wiki_Page_Name</title> |
||
| 57 | <type>wiki-page</type> |
||
| 58 | <url> |
||
| 59 | http://www.redmine.org/projects/new_crm_dev/wiki/Wiki_Page_Name |
||
| 60 | </url> |
||
| 61 | <description>h1. Wiki Page Name wiki_keyword</description> |
||
| 62 | <datetime>2016-03-25T05:23:35Z</datetime> |
||
| 63 | </result> |
||
| 64 | <result> |
||
| 65 | <id>10</id> |
||
| 66 | <title>Issue #10 (Closed): Issue_Title</title> |
||
| 67 | <type>issue closed</type> |
||
| 68 | <url>http://www.redmin.org/issues/10</url> |
||
| 69 | <description>issue_keyword</description> |
||
| 70 | <datetime>2016-03-24T05:18:59Z</datetime> |
||
| 71 | </result> |
||
| 72 | </results> |
||
| 73 | </pre> |