Repositories API

Available in Nexus Repository OSS and Nexus Repository Pro

Introduction

This set of endpoints is for interacting with repositories directly.

Endpoints

Repository Management

It is possible to create, update and retrieve repository configuration. For details on how each format is used, please see the embedded Swagger documentation. Accessing the documentation can be found using the following link:

<path-to-server>:<port>/#admin/system/api

List Repositories

GET /service/rest/v1/repositories

This endpoint allows us to iterate through a listing of repositories a user has browse access to.

Let's get a listing of the repositories that the user admin can browse:

curl -u admin:admin123 -X GET 'http://localhost:8081/service/rest/v1/repositories'

This produces a response that is a listing of all repositories the user is allowed to browse:

[
  {
    "name": "nuget.org-proxy",
    "format": "nuget",
    "type": "proxy",
    "url": "http://localhost:8081/repository/nuget.org-proxy",
    "attributes" : {
      "proxy" : {
        "remoteUrl" : "https://www.nuget.org/api/v2/"
      }
    }
  },
  {
    "name": "maven-releases",
    "format": "maven2",
    "type": "hosted",
    "url": "http://localhost:8081/repository/maven-releases"
  },
...
]

This endpoint returns all repositories and does not allow for pagination.

Note that the ordering of repositories is consistent across multiple queries and is not alphabetical.