Search

Search

GET /search.json?searchFor={resource}&searchTerm={search_term}

Perform a search in one of several Projects settings.

Request

GET /search.json?searchFor=tasks&searchTerm=spock

Options

Attribute

Req/Opt

Default

Description

searchFor Required   The resource you would like to search within, for example 'tasks'
searchTerm Required   The word or phrase you'd like to search for
projectId Optional 0 The ProjectID you would like to search within
sortOrder  Optional   'name' or 'dateupdated' to decide the order of the search results
includArchivedProjects  Optional n/a True or False to include archived items or not.
includeCompletedItems  Optional n/a 

True or False to include Completed items or not

pageSize  Optional 20 Define number of results to show, for example 20

Search using Tags

To search for a resource with an attached tag of 'My Test', do the following:

To search for a Tag, you use a hash symbol and square brackets in the searchTerm, like this : #[My Test]

Then where performing a query to the API, you need to ASCII encode the # [ ] symbols, so a GET query to the API will look like this:

GET to /search.json?searchFor=messages&searchTerm=%23%5BMy+Test%5D

In the above example, #, [ and ] have been changed to %23, %5B and %5D respectively.

Resources that can be Searched:

  • projects
  • notebooks
  • files
  • tasks
  • tasklists
  • milestones
  • messages
  • links
  • events
  • people
  • companies
  • taskComments
  • fileComments
  • notebookComments
  • milestoneComments
  • linkComments

Response

{
  "searchResult": {
    "tasks": [
      {
        "taskListId": "12345",
        "name": "Genesis planet",
        "companyName": "Teamwork",
        "projectName": "Teamwork Project",
        "projectId": "1",
        "taskEstimateMinutes": "90",
        "taskDisplayOrder": "1",
        "taskParentTaskId": "",
        "lastUpdated": "2016-06-10T12:43:48Z",
        "tags": [
          {
            "name": "My Test",
            "id": "377",
            "color": "#9b7cdb"
          }
        "taskProgress": "0",
        "id": "54321",
        "completed": false,
        "taskListName": "To do today"
      }
    ],
    "moreAvailable": true
  },
  "STATUS": "OK"
}