Rest Search » History » Version 2

Takenori TAKAKI, 2021-07-14 09:34

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