Using the Nexus3 API how do I get a list of artifacts in a repository

前端 未结 2 1213
温柔的废话
温柔的废话 2020-12-03 13:04

We are migrating from Nexus Repository Manager 2.1.4 to Nexus 3.1.0-04. With version 2 we have been able to use the API to get a list of artifacts by repository, however we

相关标签:
2条回答
  • 2020-12-03 13:40

    Once your migration is done, it can be worth to investigate to update your version of Nexus.

    That way, you will be able to use the - still in beta - new API for Nexus. It's available by default on the version 3.3.0 and more: http://localhost:8082/swagger-ui/

    Basically, you retrieve the json output from this URL: http://localhost:8082/service/siesta/rest/beta/assets?repositoryId=YOURREPO

    Only 10 records will be displayed at a time and you will have to use the continuationToken provided to request the next 10 records for your repository by calling: http://localhost:8082/service/siesta/rest/beta/assets?continuationToken=46525652a978be9a87aa345bdb627d12&repositoryId=YOURREPO

    More information here: http://blog.sonatype.com/nexus-repository-new-beta-rest-api-for-content

    0 讨论(0)
  • 2020-12-03 13:44

    One of our internal team members put this together. It doesn't use the blobStore but accomplishes I believe what you are trying to do (and a bit more): https://gist.github.com/kellyrob99/2d1483828c5de0e41732327ded3ab224

    For some background, think of a blobStore as just where we store the bits, with no information about them. OrientDB has Component/Asset records and stores all the info about them. You'll generally want to use that instead of the blobStore for Asset information as a result.

    0 讨论(0)
提交回复
热议问题