Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get specific property value in Artifactory

Tags:

artifactory

Is there a way using REST but avoiding aql to get specific custom property value in Artifactory. Artifact name, repo and property key are known. Get on artifact path does not show custom properties at all.

Any advice?

like image 788
user1316502 Avatar asked Sep 16 '25 00:09

user1316502


1 Answers

It seems that what you are looking for is this link titled: Artifactory REST API - Item Properties

This is how the REST will look like:

$ curl -uadmin:password "http://localhost:8081/artifactory/api/storage/repository/path/to/file.jar?properties"

This REST API will return the artifact properties. Now in order to get a specific property, you need to pass it in the REST as follows:

$ curl -iuadmin:password "http://localhost:8081/artifactory/api/storage/repository/path/to/file.jar?properties=build.name"

In the REST above I will get the value of the property that is named "build.name". You can replace it with any key that you need.

like image 94
Ariel Avatar answered Sep 17 '25 18:09

Ariel