ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How to get all S3 stored files of a given project

book

Article ID: 145501

calendar_today

Updated On:

Products

BlazeMeter

Issue/Introduction

For archiving and other purposes, it may be necessary, especially in a Private Cloud environment, to get a list of all files that are stored on S3 compatible storage for a given project.
What APIs need to be executed to get this list?

Environment

Blazemeter SaaS

Resolution

Project files are used in tests, multi tests, and reports/masters. Let's start with tests.
1) In order to get all tests of a project run this API:

https://<Blazemeter URL>/api/v4/tests?limit=99999&projectId=<projectID> will give you a list of all (single) tests within that project. 

2) Then, for each test, you can get the files using:
https://<Blazemeter URL>/api/v4/tests/<testID>/files

3) Similarly, run following APIs for multi tests:

https://<Blazemeter URL>/api/v4/multi-tests?limit=99999&projectId=<projectID> will give you a list of all multi tests within that project. 
https://<Blazemeter URL>/api/v4/multi-tests/<multitestID>/files

4) and for masters:
https://<Blazemeter URL>/api/v4/master?limit=99999&projectId=<projectID> will give you a list of all masters within that project. 
https://<Blazemeter URL>/api/v4/masters/<masterID>/files

5) Substitute for a Private Cloud environment the <Blazemeter URL> with your own Blazemeter URL. For public Blazemeter it is a.blazemeter.com

Additional Information

There may be other files used in that project if shared folders are being used. However shared folders can be used in all projects of the workspace, so they are not limited to that particular project only.