@PLUGIN@ - /project/ REST API ===================+=========
This page describes the ‘/project/’ REST endpoints that are added by the @PLUGIN@ plugin.
Please also take note of the general information on the REST API.
POST /project/{project-name}/@PLUGIN@~images
Uploads an image.
The image must be specified in the request body as a ImageInput entity.
Caller must have the Create Reference access right on the refs/images/* namespace of the project.
POST /config/server/@PLUGIN@~images HTTP/1.0
Content-Type: application/json;charset=UTF-8
{
"image_data": "data:image/png;base64,iVBORw0KGgoAAAAN..."
}
HTTP/1.1 201 Created
DELETE /project/{project-name}/@PLUGIN@~images/{image-ref}
Deletes an image.
Caller must have the Force Push access right on the refs/images/* namespace of the project.
DELETE /config/server/@PLUGIN@~images/refs%2Fimages%2Fec%2F3b946dcbcc5dfae0e127656168ab6dc55bbda8 HTTP/1.0
HTTP/1.1 204 No Content
The refs/images/ ref, must be URL encoded. E.g. refs%2Fimages%2Fec%2F3b946dcbcc5dfae0e127656168ab6dc55bbda8.
The ImageInput entity contains the image that should be uploaded.
Part of Gerrit Code Review