1

I am trying to get the list of file names from the build artifacts using jenkins rest api. This URL http://your.jenkins.server/job/your.job/lastStableBuild/artifact/relativePath would download the artifact. Is it possible to get the names of the files contained in the artifact without downloading it using jenkins api?

Suppose,the build artifact contains around 5 text files with names ending with .config Is it possible to retrieve only the file names ending with .config using jenkins API?

user2301
  • 1,857
  • 6
  • 32
  • 63

1 Answers1

2

I found this jenkins api as useful to get list of artifacts http://your.jenkins.server/job/your.job/lastStableBuild/api/json?tree=artifacts%5BrelativePath%5D from (ref: Is there any Jenkins API to get artifacts name and download it?) the artifacts then can be retrieved by parsing the JSON object in my application.

user2301
  • 1,857
  • 6
  • 32
  • 63