vWork only stores live data for one year by default. A common use of the vWork API is to retrieve completed job data for data warehousing or to keep an archival copy.
Whilst this can be done using the CSV Export report, (instructions available here) many customers prefer to automate this task using the API. There are a number of ways to retrieve job data via the API.
You can retrieve one job at a time if you know the Job ID
The following example retrieves job 123456, using an API Key of ABCDEFG:
You can ask the API for all completed jobs since the last time you asked using the "completed_at" filter
The following example retrieves all jobs completed since the 1st of January 2018 at 9am NZDT time. Please note that to achieve the "since the last time you asked" functionality, you need to know this time and insert it in the URL:
You can also ask the API for all completed jobs that have been updated in the last hour.
The following example retrieves jobs with a completed status that have been updated since the 1st of January 2018 at 9:30am NZDT:
This is more useful than the 2nd example above, as it also captures any changes that were made to the job after it was completed.
Depending on how many results you get from your query, you may need to retrieve multiple pages of results. There is more information on API paging available here.
If you need a hand with any of this or simply need an API key, please send an email to email@example.com, we're always happy to help.