Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Last updated filter for API GETs


Hi TestRail Support - We are using the API to ETL data out of testrail into our reporting platform (which consumes information from a lot of subsystems). The issue is that we need to ensure that we get all data that was updated and/or created since the previous ETL took place. Is it possible or could you add a filter to the API that allows for filtering based on the last updated time of that entity?



Hi Jason,

Thanks for your posting! Which API methods are you using for your reports? This filter is already available for select API methods where it makes sense such as get_cases:

Other API methods also often have a created_after/create_before filter (runs/plans/results, for example).



Thanks Tobias! That is great news about test cases having the last updated filter - sorry that I missed that.

We need it for the following object types:

  • Test Run (most important, does not have it)
  • Test (does not have it)
  • Test Result (does not have it)
  • Test Case (has it)


Hi Jason,

Thanks for the additional details. Happy to provide additional feedback:

  • Test runs are rarely updated and test runs only have a few properties that are really part of the run (description, assignee, name, milestone) and the interesting bits are tests & results inside a test run. You can already use the created_after/created_before filter but we are happy to look into update filters as well for a future version.
  • Tests don’t have a creation or update date by themselves and they are automatically managed via the case selection.
  • As for test runs, results are rarely updated but there are also the created_after/created_before filters again.

Can you provide a few more details on what you are trying to accomplish? I’m happy to provide additional feedback and this might involve looking at other run attributes (e.g. the is_completed filter).



Thanks Tobias.

This all makes sense. So the high level issue is that we cannot pull down more than a days worth of data (i.e. filter tests, test cases, test results, and test runs to created_after today - 1 day). Otherwise, the ETL process takes too long (hours+).

Our goal is to grab any data that has changed across those entities (test cases, test results, tests, and test runs) in the past day - or just since the last ETL took place.

Let’s take a test run for example. If I only grab data for test runs that aren’t complete, then things work fine. I no longer need to filter on create_after as I can limit what I ETL to incomplete test runs.

But how do I identify test runs that have recently been closed and pull back the associated tests and test results? The only way to do this is to pull down ALL test runs, which simply takes too long given the amount of data in our system.


Hi Jason,

Can you share a few more details on how the process looks like? What are the expensive/time-consuming parts? Is it reading the data from TestRail or post-processing it afterwards?