/entries/search POST

Beta – Removed/Redirected

Due to many understandable complaints, we’re changing this to HTTP GET, and redirecting the request to /reports/search. GET requests will be redirected, POST requests will be ignored, and eventually this method will be removed.

When requesting a set of entries from Tempo via search, you must provide a Context XML document. This is basically a set of parameters telling Tempo which entries you want. It allows you to specify which users to look at, projects, tags, and the date range. Here’s a full example of the options:

<?xml version="1.0" encoding="UTF-8"?>
<context>
  <interval>last7days</interval>
  <start-date>2008-01-01</start-date>
  <end-date>2008-06-01</end-date>
  <project-ids type="array">
    <project-id type="integer">1024</project-id>
    <project-id type="integer">2048</project-id>
    <project-id type="integer">8192</project-id>
  </project-ids>
  <user-ids type="array">
    <user-id type="integer">1024</user-id>
    <user-id type="integer">2048</user-id>
  </user-ids>
  <tags type="array">
    <tag>tempo</tag>
    <tag>support</tag>
  </tags>
  <exclude-tags type="array">
    <exclude-tag>discovery</exclude-tag>
    <exclude-tag>internal</exclude-tag>
  </exclude-tags>
</context>

Note: It’s important that you specify the attribute type="array" for the following grouped attributes:
user-ids, project-ids, tags and exclude-tags.

Here’s an example of how you’d execute the search using curl, assuming you saved your XML in a file called ‘context.xml’:

curl -k -X POST -T context.xml -H 'Content-Type:application/xml' \
  -H 'Accept:application/xml' --user login:password \
  https://hotdogzllc.keeptempo.com/entries/search

Parameters

start-date

Date string field, will be parsed by Ruby and Rails’ to_date methods. Recommended format is YYYY-MM-DD.

end-date

Date string field, will be parsed by Ruby and Rails’ to_date methods. Recommended format is YYYY-MM-DD.

interval

The presence of this option causes start-date and end-date to be ignored. Provides a number of
convenient short cuts for dynamic date ranges:

  • today
  • yesterday
  • thisweek
  • lastweek
  • last7days
  • thismonth
  • lastmonth
  • thisquarter
  • lastquarter
  • thisyear
  • lastyear
  • alltime
project-ids

An array of project-id elements, each containing the ID of a project to include in this search.

user-ids

An array of user-id elements, each containing the ID of a user to include in this search.

tags

An array of tag elements, each containing the name of a tag to include in this search.

exclude-tags

An array of exclude-tag elements, each containing the name of a tag to exclude in this search.

exclude-locked

Boolean value indicating whether search should exclude locked entries, defaults to true. Use 1 and 0 for true and false.

include-inactive

Determines whether or not to include inactive users and inactive projects in the search. defaults to false. Use 1 and 0 for true and false.