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 /projects/{project-name}/@PLUGIN@~copy
Copies a project.
Information about the copy target must be provided in the request body as a CopyProjectInput entity.
Caller must be a member of a group that is granted the ‘CopyProject’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
PUT /projects/myProject/@PLUGIN@~copy HTTP/1.0
Content-Type: application/json;charset=UTF-8
{
"name": "myProjectCopy"
}
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
}
PUT /projects/{project-name}/@PLUGIN@~copy.resume
Resumes copying to a project from the original copy source.
Caller must be a member of a group that is granted the ‘CopyProject’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
Options may be specified in the request body as a CopyResumeInput entity.
PUT /projects/myProjectCopy/@PLUGIN@~copy.resume HTTP/1.0
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 /projects/{project-name}/@PLUGIN@~import.resume
Resumes importing to a project from the original copy source.
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 ‘ImportProject’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
PUT /projects/myProjectCopy/@PLUGIN@~import.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
}
POST /projects/{project-name}/@PLUGIN@~delete)
Mark a project import as completed.
Once a project import is completed it cannot be resumed any more.
POST /projects/myProject/@PLUGIN@~delete HTTP/1.0
HTTP/1.1 204 No Content
The CopyProjectInput entity contains information about a the copy target.
The CopyResumeInput entity contains information about an copy resume.
Part of Gerrit Code Review