<p>Try this: </p>

<pre><code># Get status
curl http://localhost:8081/nexus/service/local/status 
# List of repositories
curl http://localhost:8081/nexus/service/local/repositories
</code></pre>

<p>For the json parameter: </p>

<pre><code>curl -i -H "Accept: application/json" &lt;url&gt;
</code></pre>

<p>More information, see this <a href="http://www.sonatype.com/people/2012/07/learning-the-nexus-rest-api-read-the-docs-or-fire-up-a-browser/" rel="nofollow noreferrer">link</a></p>

CC BY-SA 4.0
2019-01-07T08:49:22.133Z
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
CC BY-SA 4.0
2019-01-04T19:29:27.810Z
2019-01-04T19:29:27.810Z
dalmo.santos
<p>For nexu3 this how to list artifact using curl:</p>
<p>curl -X GET &quot;http://localhost:8081/nexus/service/rest/v1/search?repository={repository_name}&amp;format=maven2&amp;maven.groupId={groupeID}&amp;maven.artifactId={ArtifactID}&amp;maven.extension={package_type}&quot; -H &quot;accept: application/json&quot;</p>

CC BY-SA 4.0
2024-02-22T08:40:07.733Z
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Community
CC BY-SA 4.0
2024-02-21T19:22:05.250Z
2024-02-21T19:22:05.250Z
Alioua
<p>I want to get a list (json) of all artifacts in one specific repository via the REST API. </p>

<p>I've already tried: </p>

<pre><code>curl -X GET http://localhost/nexus/service/local/respositories/&lt;reponame&gt;/content/
</code></pre>

<p>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.</p>

<p>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.</p>

CC BY-SA 4.0
2019-05-12T16:01:36.557Z
Do you still use nexus2 or did you upgrade to version 3?
030
CC BY-SA 4.0
2019-05-13T12:27:25.303Z
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
<api><nexus><n3dr>
Nexus2: How can I get a list of all artifacts from a specific repository via REST API?
alex
# Nexus2: How can I get a list of all artifacts from a specific repository via REST API?

(Asked by: username_0 on 2019-01-04)

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//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.

**Tags:** api, nexus, n3dr

> **Comments:**
> **username_1**: Do you still use nexus2 or did you upgrade to version 3?  
> **username_0**: 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  

---

## 2 answers

### Answer by username_2 on 2019-01-04. Score: 2

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" 

More information, see this link

> **Comments:**
> **username_0**: 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  

---

### Answer by username_3 on 2024-02-21. Score: 0

For nexu3 this how to list artifact using curl:

curl -X GET "http://localhost:8081/nexus/service/rest/v1/search?repository={repository\_name}&format=maven2&maven.groupId={groupeID}&maven.artifactId={ArtifactID}&maven.extension={package\_type}" -H "accept: application/json"

> **Comments:**
> **username_4**: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).  

---

