Skip to content

Commit

Permalink
search draft
Browse files Browse the repository at this point in the history
  • Loading branch information
rloads committed Sep 21, 2012
1 parent fad0657 commit 9d56742
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions search.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Search
Resource Scope Resource Scope
-------------- --------------


* `GET /search?q=lion` will search for all 5 resources which has keyword `lion`. * `GET /search?q=lion` will search for all 5 resources with keyword `lion`.
* `GET /search?q=lion&resource=Workspace` will search for workspaces only. * `GET /search?q=lion&resource=Workspace` will search for workspaces only.
* `GET /search?q=lion&resource=Workspace,File` will search for workspaces and files. * `GET /search?q=lion&resource=Workspace,File` will search for workspaces and files.


Expand All @@ -32,15 +32,15 @@ Response
``` ```


`type` denotes the type of the content which can be `Workspace`, `Comment`, `File`, `Page` and `Task`. `type` denotes the type of the content which can be `Workspace`, `Comment`, `File`, `Page` and `Task`.
`content` will be the exact same JSON representation of each resources described in this documentation. `content` will be the exact same JSON representation of each resources described in other documentation.
For detail, see the 'GET' section of each resources. For details, see the 'GET' section of each resources.


Common Filter Options Common Filter Options
-------------------- --------------------


* `GET /search?page=2` to get next page of the search results. The search result will be paginated 30 items per page. * `GET /search?page=2` to get the page two of the search results. The search result will be paginated 30 items per page.
* `GET /search?order_by=updated_at+desc` will return sorted results by `updated_at` field of the results. * `GET /search?order_by=updated_at+desc` will return sorted results by `updated_at` field.
* `GET /search?order_by=created_at+desc` will return sorted results by `created_at` field of the results. * `GET /search?order_by=created_at+desc` will return sorted results by `created_at` field.
* `GET /search?updated_since=1997-08-14T15:39:07-07:00` will return resources updated after the given time. * `GET /search?updated_since=1997-08-14T15:39:07-07:00` will return resources updated after the given time.
* `GET /search?created_since=1984-08-14T15:39:07-07:00` will return resources created after the given time. * `GET /search?created_since=1984-08-14T15:39:07-07:00` will return resources created after the given time.


Expand All @@ -55,4 +55,10 @@ Resource Dependent Filter Options
GET /workspaces?state=archived GET /workspaces?state=archived


See each individual document to get more details on filter options. See API documents for each resource types to get more details on filter options.

* [Workspace](https://github.com/vispower/teamplatform-api/blob/master/workspace.md)
* [Comment](https://github.com/vispower/teamplatform-api/blob/master/comment.md)
* [File](https://github.com/vispower/teamplatform-api/blob/master/file.md)
* [Page](https://github.com/vispower/teamplatform-api/blob/master/page.md)
* [Task](https://github.com/vispower/teamplatform-api/blob/master/task.md)

0 comments on commit 9d56742

Please sign in to comment.