/reports GET

Provides a listing of all saved reports. Saved reports are returned as SavedContext entities (saved-context in XML). Eventually this will be updated to provide Report entities.

/reports/:id GET

Provides details on a saved report. Returns a SavedContext entity. This will eventually be updated to return Report entities.

/reports/search GET

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.

Things of note:

  • There is a default context, meaning you do not have to supply a context document
  • Supplying a context document sets those parameters for your session
  • The entries for the current context are returned if no context is supplied
  • To clear the current context and revert to default, use “/reports/reset GET
  • The default context filters for the current user, for the ‘last7days’ date range

Here’s an example showing all the options used together:

<?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>
  <limit>20</limit>
  <offset>1</offset>
</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.

If limit is not supplied, the list of entries returned is an initial page of 10 entries. Subsequent entries can be retrieved by requesting the next page (the offset parameter) or by upping the page count (the offset parameter). However, this doesn’t have to be part of the XML document, you could alternatively supply page and per_page in the request URI to do the same thing (e.g. https://app.keeptempo.com/reports/search?page=1&per_page=20).

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 GET -T context.xml -H 'Content-Type:application/xml' \
  -H 'Accept:application/xml' --user login:password \
  https://hotdogzllc.keeptempo.com/reports/search

/reports/clear GET

Allows the user to clear the current context filter in his session. See /reports/search GET for more information.

Coming Soon

We don’t have any firm dates in mind, but eventually we want the Reports API will to switch over to Report handling entities, instead of SavedContext objects. It’s not on the immediate agenda because it will require a lot of refactoring on our back-end. Once that happens, we’ll be able to provide some new methods here for manipulating saved reports over the API, as well as allowing you to GET a report directly from the API, with its entries in the response data.

The methods we expect to implement are:

  • /reports GET
  • /reports POST
  • /reports/new POST
  • /reports/:id/edit GET
  • /reports/:id PUT
  • /reports/:id DELETE