0

Using the Nexus API docs I can retrieve a list of assets within a repository with the following curl command:

curl -u user:password -X GET 'https://nexusurl/service/rest/v1/components?repository=docker'

How can I get a specific asset? e.g. in the repository 'docker' with the path:

v2/x/manifests/1.0

I get a 404 with the following attempt:

curl -u user:password -X GET 'https://nexusurl/service/rest/v1/components?repository=docker/v2/x/manifests/1.0'

Nexus version: 3.18

Yunter
  • 274
  • 3
  • 17

1 Answers1

1

You can use the /v1/assets/{id} endpoint once you have the ID from the list. If this is not sufficient, you either need to have a very specific /v1/search/assets or I suspect what you want is not possible at this time (latest 3.25.1).

joedragons
  • 2,505
  • 21
  • 21
  • 1
    Thanks for the answer. Yes, as of now the API doesn't provide a GET by specific path. I've found an alternative way to approach my problem which isn't relative to Nexus API so it's probably not worth sharing here. Thanks again – Yunter Aug 14 '20 at 12:04