Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get list of builds for an artifact #2534

Open
krishnamanchikalapudi opened this issue Apr 30, 2024 · 1 comment
Open

Get list of builds for an artifact #2534

krishnamanchikalapudi opened this issue Apr 30, 2024 · 1 comment
Labels
question Further information is requested

Comments

@krishnamanchikalapudi
Copy link

Hi,
Is there a CLI command that will get a list of published builds for an artifact?

@krishnamanchikalapudi krishnamanchikalapudi added the question Further information is requested label Apr 30, 2024
@yahavi
Copy link
Member

yahavi commented May 11, 2024

@krishnamanchikalapudi
Thank you for using the JFrog CLI.

There's a method, which necessitates admin privileges. This ensures that users can't access information without the appropriate permissions.

The approach involves executing AQL through curl:

jf rt curl -X POST /api/search/aql -H "Content-Type: text/plain" -d 'builds.find({"module.artifact.item.name": "artifact-name"}).include("name","number")'

Notice: Without admin privileges, you'll get empty results.

Example results:

{
"results" : [ {
  "build.name" : "Dotnet",
  "build.number" : "1091"
},{
  "build.name" : "Dotnet",
  "build.number" : "1092"
},{
  "build.name" : "Dotnet",
  "build.number" : "1093"
},{
  "build.name" : "Dotnet",
  "build.number" : "1094"
},{
  "build.name" : "Dotnet",
  "build.number" : "1097"
},{
  "build.name" : "Dotnet",
  "build.number" : "1098"
},{
  "build.name" : "Dotnet",
  "build.number" : "1099"
},{
  "build.name" : "Dotnet",
  "build.number" : "1102"
},{
  "build.name" : "Dotnet",
  "build.number" : "1104"
},{
  "build.name" : "Dotnet",
  "build.number" : "1105"
} ],
"range" : {
  "start_pos" : 0,
  "end_pos" : 10,
  "total" : 10,
  "limit" : 100
}
}

Please inform me if that was helpful.
Otherwise, if you could provide more details about your specific use case, perhaps we can discover a more suitable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants