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" }
As result a ImportStatisticInfo entity is returned.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json; charset=UTF-8 )]}' { "num\_changes\_created": 5 }
GET /config/server/@PLUGIN@~projects/
Lists the imported projects.
Caller must be a member of a group that is granted the ‘Import’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
It is possible to filter the list of imported projects using the match
option. The response will include only those projects whose name contains the given match
substring, case insensitive.
GET /config/server/@PLUGIN@~projects/?match=my HTTP/1.0
As result a map is returned that maps the project name to ImportProjectInfo entity.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json; charset=UTF-8 )]}' { "myProject": { "from": "http://localhost:8081/", "name": "myProject", "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" } ] }, "myProject2": { "from": "http://localhost:8081/", "name": "projectToBeRenamed", "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/", "name": "myProject", "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" }
As result a ResumeImportStatisticInfo entity is returned.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json; charset=UTF-8 )]}' { "num\_changes\_created": 1, "num\_changes\_updated": 2 }
PUT /config/server/@PLUGIN@~groups/{group-name}
Imports a group.
Information about the group import must be provided in the request body as a ImportGroupInput 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@~groups/myGroup HTTP/1.0 Content-Type: application/json;charset=UTF-8 { "from": "https://some-gerrit-server:8080", "user": "myUser", "pass": "myPassword" }
DELETE /config/server/@PLUGIN@~projects/{project-name}
Mark a project import as completed.
Once a project import is completed it cannot be resumed any more.
DELETE /config/server/@PLUGIN@~projects/myProject HTTP/1.0
HTTP/1.1 204 No Content
The ImportGroupInput
entity contains information about a group import.
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.
The ImportStatisticInfo
entity contains statistics about a project import.
The ResumeImportStatisticInfo
entity contains statistics about a project import resume.
Part of Gerrit Code Review