I want to get a list (json) of all artifacts in one specific repository via the REST API.

I've already tried:

curl -X GET http://localhost/nexus/service/local/respositories/<reponame>/content/

This works, but it deliveres me a json listing all my subdirectories in this repo. But what I want is a list with all the artifacts contained in all subdirectories.

Someone knows how to do this? Is there a way to iterate through all folders? I was thinking about the search keyword, but I wouldn't know for what to search.

  • Do you still use nexus2 or did you upgrade to version 3?
    – 030
    May 12, 2019 at 16:01
  • still using nexus 2 because of various reasons... we are actually thinking to move to another repo manager instead of upgrading - blob stores are not really something exciting
    – alex
    May 13, 2019 at 12:27

1 Answer 1


Try this:

# Get status
curl http://localhost:8081/nexus/service/local/status 
# List of repositories
curl http://localhost:8081/nexus/service/local/repositories

For the json parameter:

curl -i -H "Accept: application/json" <url>

More information, see this link

  • Thanks for your answer first! But this is not what I am looking for. What I need is a list of the actual content of one repository I want to specify... with the request I wrote I can only get to the first layer of the directory structure (the folders inside the repo). The list I need should include the contents of each folder inside the repo
    – alex
    Jan 7, 2019 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.