@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.

@PLUGIN@ Endpoints

Upload Image

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.

Request

  POST /config/server/@PLUGIN@~images HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "image_data": "data:image/png;base64,iVBORw0KGgoAAAAN..."
  }

Response

  HTTP/1.1 201 Created

JSON Entities

ImageInput

The ImageInput entity contains the image that should be uploaded.

  • file_name: The name of the image file (optional).
  • image_data: The image data URL.

SEE ALSO

GERRIT

Part of Gerrit Code Review