This page describes the REST endpoints that are added by the @PLUGIN@ plugin.
Please also take note of the general information on the REST API.
PUT /config/server/@PLUGIN@~projects/{project-name}
Imports a project.
Information about the project import must be provided in the request body as a ImportProjectInput entity.
Caller must be a member of a group that is granted the ‘Import’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
PUT /config/server/@PLUGIN@~projects/myProject HTTP/1.0
Content-Type: application/json;charset=UTF-8
{
"from": "https://some-gerrit-server:8080",
"user": "myUser",
"pass": "myPassword"
}
GET /config/server/@PLUGIN@~projects/
Lists the imported projects.
As result a map is returned that maps the project name to ImportProjectInfo entity.
Caller must be a member of a group that is granted the ‘Import’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
GET /config/server/@PLUGIN@~projects/ HTTP/1.0
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json; charset=UTF-8
)]}'
{
"myProject": {
"from": "http://localhost:8081/",
"imports": [
{
"timestamp": "2015-03-11 09:14:21.748000000",
"user": {
"_account_id": 1000000,
"name": "Administrator",
"email": "edwin.kempin@gmail.com",
"username": "admin"
},
"remote_user": "admin"
}
]
},
"myOtherProject": {
"from": "http://localhost:8081/",
"imports": [
{
"timestamp": "2015-03-11 09:16:04.511000000",
"user": {
"_account_id": 1000000,
"name": "Administrator",
"email": "edwin.kempin@gmail.com",
"username": "admin"
},
"remote_user": "admin"
}
]
}
}
GET /config/server/@PLUGIN@~projects/{project-name}
Gets information about the imports of a project.
As result a ImportProjectInfo entity is returned.
Caller must be a member of a group that is granted the ‘Import’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
GET /config/server/@PLUGIN@~projects/myProject HTTP/1.0
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json; charset=UTF-8
)]}'
{
"from": "http://localhost:8081/",
"imports": [
{
"timestamp": "2015-03-11 09:14:21.748000000",
"user": {
"_account_id": 1000000,
"name": "Administrator",
"email": "edwin.kempin@gmail.com",
"username": "admin"
},
"remote_user": "admin"
}
]
}
GET /config/server/@PLUGIN@~projects/{project-name}/resume
Resumes a project import.
Information about the import resume must be provided in the request body as a ImportResumeInput entity.
Caller must be a member of a group that is granted the ‘Import’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
PUT /config/server/@PLUGIN@~projects/myProject/resume HTTP/1.0
Content-Type: application/json;charset=UTF-8
{
"user": "myUser",
"pass": "myPassword"
}
The ImportInfo entity contains information about a past import.
The ImportProjectInfo entity contains information about the past imports of a project.
The ImportProjectInput entity contains information about a project import.
The ImportResumeInput entity contains information about an import resume.
Part of Gerrit Code Review