Admin privileges required for these API methods.
id | integer | Unique UD of the RepositoryImport. |
---|---|---|
account_id | integer | ID of the associated Account. |
repository_id | integer | ID of the Repository for which import is performed. |
state | string | Current state of the import process. See list of available states below. |
uri | string | URL from which a Subversion dump should be downloaded for import. |
updated_at | datetime | Time when the import was last updated. |
created_at | datetime | Time when the import was first added to the system. |
uri | string | Required. Must be a valid URL with protocol (http, https, ftp). Supports Basic authentication. |
---|
GET /api/repository_imports.json
Click to expand…
json http-response[{
"repository_import": {
"uri": "http://example.com/path/to/svn/file.dump",
"created_at": "2011/10/03 13:57:51 +0800",
"updated_at": "2011/10/03 13:57:51 +0800",
"account_id":2, "id":3,
"repository_id": 15,
"state": "new"
}
}]
GET /api/repository_imports.xml
Click to expand…
xml http-response<?xml version="1.0" encoding="UTF-8"?>
<repository-imports type="array">
<repository-import>
<account-id type="integer">2</account-id>
<created-at type="datetime">2011-10-05T15:54:22+08:00</created-at>
<id type="integer">1</id>
<repository-id type="integer">15</repository-id>
<state>new</state>
<updated-at type="datetime">2011-10-05T15:54:22+08:00</updated-at>
<uri>http://example.com/path/to/svn/file.dump</uri>
</repository-import>
</repository-imports>
GET /api/repository_imports/{IMPORT_ID}.json
Click to expand…
json http-response{
"repository_import": {
"uri": "http://example.com/path/to/svn/file.dump",
"created_at": "2011/10/03 13:57:51 +0800",
"updated_at": "2011/10/03 13:57:51 +0800",
"account_id":2, "id":3,
"repository_id": 15,
"state": "new"
}
}
GET /api/repository_imports/{IMPORT_ID}.xml
Click to expand…
xml http-response<?xml version="1.0" encoding="UTF-8"?>
<repository-import>
<account-id type="integer">2</account-id>
<created-at type="datetime">2011-10-05T15:54:22+08:00</created-at>
<id type="integer">1</id>
<repository-id type="integer">15</repository-id>
<state>new</state>
<updated-at type="datetime">2011-10-05T15:54:22+08:00</updated-at>
<uri>http://example.com/path/to/svn/file.dump</uri>
</repository-import>
Imports can only be created for Subversion repositories. In order to import an SVN dump, create a Subversion Repository first, then create a RepositoryImport for it with this method.
For now only imports by URL are supported. See list at the top of this page for possible states.
POST /api/{REPOSITORY_ID}/repository_imports.json
{
"repository_import": {
"uri": "http://example.com/path/to/svn/file.dump"
}
}
Click to expand…
json http-response{
"repository_import": {
"uri": "http://example.com/path/to/svn/file.dump",
"created_at": "2011/10/03 13:57:51 +0800",
"updated_at": "2011/10/03 13:57:51 +0800",
"account_id":2, "id":3,
"repository_id": 15,
"state": "new"
}
}
--OR IF INVALID--
{
"errors": ["Error message"]
}
POST /api/{REPOSITORY_ID}/repository_imports.xml
<repository-import>
<uri>http://example.com/path/to/svn/file.dump</uri>
</repository-import>
Click to expand…
xml http-response<repository-import>
<account-id type="integer">2</account-id>
<created-at type="datetime">2011-10-05T15:57:25+08:00</created-at>
<id type="integer">2</id>
<repository-id type="integer">16</repository-id>
<state>new</state>
<updated-at type="datetime">2011-10-05T15:57:25+08:00</updated-at>
<uri>http://example.com/path/to/svn/file.dump</uri>
</repository-import>
--OR IF INVALID--
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Name can't be blank</error>
</errors>