1

We are using nexus 3.0
i upload my files with curl to raw repository, like in documentation:
https://books.sonatype.com/nexus-book/3.0/reference/raw.html#_uploading_files_to_hosted_raw_repositories

i tried to query with:
curl -u login:pw https://mynexus/myrepo
curl -u login:pw https://mynexus/myrepo/
but receive only html with errors

How can i query all uploaded files with curl?

ya_dimon
  • 3,483
  • 3
  • 31
  • 42

2 Answers2

3
curl 'http://localhost:8081/nexus/service/extdirect' -H 'Content-Type: application/json' -H 'Accept: */*' --data-binary '{"action":"coreui_Component","method":"readAssets","data":[{"page":1,"start":0,"limit":300,"sort":[{"property":"name","direction":"ASC"}],"filter":[{"property":"repositoryName","value":"repo_raw"}]}],"type":"rpc","tid":15}' --compressed

Something like this works

lookf4r
  • 31
  • 2
1

You can use Nexus REST API:

For example:

curl -u admin:admin123 -X GET 'http://localhost:8081/service/rest/v1/search?repository=maven-central&group=org.osgi'
Ruli
  • 2,592
  • 12
  • 30
  • 40
ask
  • 31
  • 2