RepositoryImportResource

Rest resource for importing repositories.

The following resources are applicable:

/import/repositories

Mount Point: /api/rest/import/repositories

POST

Imports repositories of all supported types from the configured repository directories. This method requires admin privileges.

Status codes:

Response Body

element: (custom)
media types: application/xml
application/json

imported repositories

GET

Returns a list of repository types, which support the directory import feature. This method requires admin privileges.

Status codes:

Response Body

element: (custom)
media types: application/xml
application/json

list of repository types

/import/repositories/{type}

Mount Point: /api/rest/import/repositories/{type}

POST

Imports repositories of the given type from the configured repository directory. This method requires admin privileges.

Status codes:

Parameters

name description type default
type repository type path

Response Body

element: (custom)
media types: application/xml
application/json

imported repositories

/import/repositories/{type}/bundle

Mount Point: /api/rest/import/repositories/{type}/bundle

Available Since: 1.43

POST

Available Since: 1.43

Imports a repository type specific bundle. The bundle file is uploaded to the server which is running scm-manager. After the upload has finished, the bundle file is passed to the UnbundleCommandBuilder. This method requires admin privileges.
Status codes:

Parameters

name description type default
type repository type path
name name of the repository formdata
inputStream input bundle formdata
compressed true if the bundle is gzip compressed query false

Response Body

element: (custom)
media types: */*
application/xml

empty response with location header which points to the imported repository

/import/repositories/{type}/bundle.html

Mount Point: /api/rest/import/repositories/{type}/bundle.html

Available Since: 1.43

POST

Available Since: 1.43

This method works exactly like #importFromBundle(UriInfo, String, String, InputStream), but this method returns an html content-type. The method exists only for a workaround of the javascript ui extjs. This method requires admin privileges.
Status codes:

Parameters

name description type default
type repository type path
name name of the repository formdata
inputStream input bundle formdata
compressed true if the bundle is gzip compressed query false

Response Body

element: (custom)
media types: text/html

empty response with location header which points to the imported repository

/import/repositories/{type}/directory

Mount Point: /api/rest/import/repositories/{type}/directory

Available Since: 1.43

POST

Available Since: 1.43

Imports repositories of the given type from the configured repository directory. Returns a list of successfully imported directories and a list of failed directories. This method requires admin privileges.

Status codes:

Parameters

name description type default
type repository type path

Response Body

element: import-result
media types: application/xml
application/json

imported repositories

/import/repositories/{type}/url

Mount Point: /api/rest/import/repositories/{type}/url

Available Since: 1.43

POST

Available Since: 1.43

Imports a external repository which is accessible via url. The method can only be used, if the repository type supports the Command#PULL. The method will return a location header with the url to the imported repository. This method requires admin privileges.
Status codes:

Parameters

name description type default
type repository type path

Request Body

element: import
media types: application/xml
application/json

request object

Response Body

element: (custom)
media types: */*
application/xml

empty response with location header which points to the imported repository