Why do I need to download my job data?
Sauce Labs does not retain customer job assets forever. We keep your data for 30 days, but eventually we remove your assets. Once these assets are removed, they are gone forever and Sauce Labs can not recover them.
What data do you remove?
- Job videos
- Job screenshots
- Job logs
- Job commands
Can I download this data to keep it myself?
Yes! Our REST API gives you some tools to download job data, giving you the flexibility to retrieve and store your data however you need.
While you can do this on a job-by-job basis using the command line, you'll save a lot of time by using one of our REST API client libraries and your favorite programming language.
How do I download all my jobs?
Depending on how many jobs you've run, there are two ways to fetch your job data. Sauce Labs may occasionally limit some API methods to only return a limited number of jobs in order to improve system performance. If there are jobs within the last 30 days which you can't get with Method 1, try Method 2. If that doesn't work, lodge a ticket with Support.
Method 1
Use the GET FULL JOBS method to grab all the relevant information about your jobs, including their Job IDs
Method 2
Use the GET JOBS TO AND FROM TIME method to grab all the job IDs
Fetching assets
Now you have the job IDs, you can fetch the assets like the logs, videos and screenshots.
- For each job call the GET JOB ASSET NAMES method to grab all of the asset filenames
- For each job asset name, call the GET JOB ASSET FILES method to download the relevant assets