Importing SVN via API

I have about 700 SVN repo’s to import, and I’m testing out importing via API but am running into a snag.

Update,Got it going with creating a mirror with the following payload, then I’ll come back later and unmirror them all via the API as well:

‘{
name: $name,
type: “svn”,
url: $url,
synchronizationPeriod: null,
overwriteGlobalConfiguration: false,
usernamePasswordCredential: {
enabled: true,
username: $user,
password: $pass
},
proxyConfiguration: {
host: “”,
port: 0,
username: “”,
password: “”,
overwriteGlobalConfiguration: false
}
}’

==================================================================

Original Post:

This is my manual one off test:

curl -u “user:pass” -X POST “http://localhost:8080/scm/api/v2/repositories/import/svn/url
-H “Content-Type: application/vnd.scmm-repository+json;v=2”
-H “Accept: application/vnd.scmm-repository+json;v=2”
-d '{
“type”: “svn”,
“name”: “repo-name”,
“importUrl”: “http://example.com:1443/svn/repo-name”,
“username”: “user”,
“password”: “pass”
}

Results in:

error: {“transactionId”:“88UmiShioAV”,“errorCode”:“CISPvega31”,“context”:,“message”:“type does not support command”}

Any thoughts?

Hmm guessing the same limitation exists via API as through the UI: Repository | SCM-Manager

Import via URL (Git and Mercurial only)

Is dump my only option, does that lose all meta-data, and is there a way to do this en masse?

ETA: Looks like I may attempt to bash script them all as mirrors, then unmirror them via the API. Will probably do 10 at a time or so to prevent overloading.

Hello @gsink,

thank you for your information. It doesn’t seem problematic to import it this way at first glance. If you face any questions regarding that, feel free to keep in touch with us.

Sincerely,

Till-André Diegeler
Cloudogu GmbH