Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2019-01-07T08:49:22.133Z
Answers: 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
Answers: alex
Answers: CC BY-SA 4.0
Answers: 2019-01-04T19:29:27.810Z
Answers: 2019-01-04T19:29:27.810Z
Answers: dalmo.santos
Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2024-02-22T08:40:07.733Z
Answers: 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).
Answers: Community
Answers: CC BY-SA 4.0
Answers: 2024-02-21T19:22:05.250Z
Answers: 2024-02-21T19:22:05.250Z
Answers: Alioua
Body: <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>
  
Comments: CC BY-SA 4.0
Comments: 2019-05-12T16:01:36.557Z
Comments: Do you still use nexus2 or did you upgrade to version 3?
Comments: 030
Comments: CC BY-SA 4.0
Comments: 2019-05-13T12:27:25.303Z
Comments: 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
Comments: alex
Tags: <api><nexus><n3dr>
Title: Nexus2: How can I get a list of all artifacts from a specific repository via REST API?
UserDisplayName: alex
ThreadText: # 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/<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.
  
  **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" <url>
  
  ```
  
  More information, see this [link](http://www.sonatype.com/people/2012/07/learning-the-nexus-rest-api-read-the-docs-or-fire-up-a-browser/)
  
  > **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).  
  
  ---
  
  