-
Notifications
You must be signed in to change notification settings - Fork 8
Search
Search for document and folders
When searching for a document the response will be an set of results, each with a score and a link to the document that was found.
GET /files/search/documents?query=something&workspaceids=1,2,3&from=2017-01-01T12%3A02%3A02Z&includecontent=false HTTP/1.1
Content-Type: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
<search>
<link rel="self" href="..." />
<results>
<result>
<score>100</score>
<document title="something" description="document description">
<link rel="self" href="..." />
... other document elements ...
</document>
</result>
</results>
</search>
Name | Description | Methods | Optional |
---|---|---|---|
query | The term to search for (truncates to 150 characters). Searches Title, Description and Tag fields. Optionally searches Body field if includecontent is set. | GET | No |
pagesize | The maximum number of elements to return, between 1 - 100. Default: 100 | GET | Yes |
workspaceids | A comma separated lists of workspace ids | GET | Yes |
from | The date to start the search from in encoded ISO 8601 format | GET | Yes |
to | The date to search up until in encoded ISO 8601 format | GET | Yes |
includecontent | Whether to consider document content within the search (default is false) | GET | Yes |
The workspaceids
parameter is optional. If you do not provide it search will return results from all the workspaces that the user has access to.
Although optional, we strongly encourage you to provide a list of workspaces to search within.
GET /files/search/documents?query=something&workspaceids=1,3 HTTP/1.1
Content-Type: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
Name | Description |
---|---|
result | A result element is a representation of the single search result. |
Name | Description | Methods |
---|---|---|
self | The current URI of this search. | GET |
start = results
results = element h:results {
link+,
result+
}
result = element h:result {
link+,
element h:score{ xsd:float },
element h:document{}
}
When searching for folders the response will be an array of results, each with a score, and the folder that was found.
GET /files/search/folders?query=something&workspaceids=1&from=2017-01-01T12%3A02%3A02Z HTTP/1.1
Content-Type: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
<search>
<link rel="self" href="..." />
<results>
<result>
<score>100</score>
<folder title="something" description="folder description">
<links rel="self" href="..." />
<links rel="alternate" href="http://my.huddle.net/workspace/469/folders/123" type="text/html" />
<actors name="document owner" email="[email protected]" rel="owner">
<links rel="self" href="https://..." />
<links rel="avatar" href="https://..." />
<links rel="alternate" href="https://..." type="text/html" />
</actors>
<updated>Thu, 07 Feb 2013 12:12:58 GMT</updated>
<created>Thu, 06 Dec 2012 17:43:40 GMT</created>
<workspace title="workspace title">
<links rel="self" href="https://..." />
</workspace>
</folder>
</result>
</results>
</search>
Name | Description | Methods | Optional |
---|---|---|---|
query | The term to search for (truncates to 150 characters) | GET | No |
pagesize | The maximum number of elements to return, between 1 - 100. Default: 100 | GET | Yes |
workspaceids | A comma separated lists of workspace ids | GET | Yes |
from | The date to start the search from in encoded ISO 8601 format | GET | Yes |
to | The date to search up until in encoded ISO 8601 format | GET | Yes |
The workspaceids
parameter is optional. If you do not provide it search will return results from all the workspaces that the user has access to.
When searching for tasks the response will be an array of results, each with a score, and the task that was found. The task's title, description and comments.
GET /tasks/events/search?query=something&workspaceids=1&from=2013-01-01T12%3A02%3A02Z HTTP/1.1
Content-Type: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
<search>
<link rel="self" href="..." />
<results>
<result>
<score>100</score>
<task title="something" description="task description">
<links rel="self" href="..." />
<links rel="alternate" href="http://my.huddle.net/workspace/469/tasks/123" type="text/html" />
<actor name="Task Owner" email="[email protected]" rel="owner">
<links rel="self" href="https://..." />
<links rel="avatar" href="https://..." type="image/jpeg" />
<links rel="alternate" href="https://..." type="text/html" />
</actor>
<actor name="Task Updater" email="[email protected]" rel="updated-by">
<links rel="self" href="https://..." />
<links rel="avatar" href="https://..." type="image/jpeg" />
<links rel="alternate" href="https://..." type="text/html" />
</actor>
<status>NotStarted</status>
<updated>Thu, 07 Feb 2013 12:12:58 GMT</updated>
<created>Thu, 06 Dec 2012 17:43:40 GMT</created>
<workspace title="workspace title">
<links rel="self" href="https://..." />
<links rel="alternate" href="https://..." type="text/html" />
</workspace>
</task>
</result>
</results>
</search>
{
"results": [{
"score": 100.0,
"task": {
"links": [
{ "rel": "self", "href": "..." },
{ "rel": "alternate", "href": "...", "type": "text/html" }
],
"actors": [{
"name": "Jimmy Snake",
"email": "[email protected]",
"rel": "owner",
"links": [
{ "rel": "self", "href": ".." },
{ "rel": "avatar", "href": "..", "type": "image/jpeg" },
{ "rel": "alternate", "href": "..", "type": "text/html" }
]
}, {
"name": "John Doe",
"email": "[email protected]",
"rel": "updated-by",
"links": [
{ "rel": "self", "href": ".." },
{ "rel": "avatar", "href": "..", "type": "image/jpeg" },
{ "rel": "alternate", "href": "..", "type": "text/html" }
]
}],
"title": "something",
"description": "task description",
"status": "NotStarted",
"created": "Thu, 07 Feb 2013 12:12:58 GMT",
"updated": "Thu, 06 Dec 2012 17:43:40 GMT",
"workspace": {
"title": "workspace title",
"links": [
{ "rel": "self", "href": "..." },
{ "rel": "alternate", "href": "...", "type": "text/html }
]
}
}
}],
"links": [
{ "rel": "self", "href": "..." }
]
}
Name | Description | Methods | Optional |
---|---|---|---|
query | The term to search for (truncates to 150 characters) | GET | No |
pagesize | The maximum number of elements to return, between 1 - 100. Default: 100 | GET | Yes |
workspaceids | A comma separated lists of workspace ids | GET | Yes |
from | The (task updated) date to start the search from in encoded ISO 8601 format | GET | Yes |
The workspaceids
parameter is optional. If you do not provide it search will return results from all the workspaces that the user has access to.
Wildcards *
and ?
not supported.
Single Term (single word): hello
Phrase (group of words): "hello huddle"
"hello huddle" Wednesday
"hello huddle" OR Wednesday
"hello huddle" OR "Wednesday morning"
"hello huddle" AND Wednesday
"hello huddle" AND "Wednesday morning"
Lucene supports escaping special characters that are part of the query syntax. The current list special characters are:
-
- & | ! ( ) { } [ ] ^ " ~ *? : *
To escape these character use the \ before the character. For example to search for (1+1):2 use the query:
(1+1):2
- Basic concepts
-
Resources
- Actor
- Approvals
- BulkProcess
- Calendar
- Membership
- Company
- Document
- Document library settings
- Folder
- Paged Folder
- Pins
- Integrations
- Form
- Friends
- Invitation
- Link
- Document Lock
- Folder Lock
- Localisation
- MemberAutocomplete
- Notifications
- Offline item
- PeopleBulkProcess
- Permissions
- Presence
- PublishedDocuments
- Recents
- Recommendations
- Recycle Bin
- Search
- Share
- Tasks (Todos), File Requests, Approvals
- Tasks on Documents
- Actions
- UserApprovals
- User
- VersionHistory
- Workspace
- Workspaces
- SamlPartners
- Logout
- Impersonation
- Administration
- WebHooks