@PLUGIN@ - /server-config/ REST API

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.

Server Config Endpoints

Get the content of a configuration file.

Read File

GET /plugins/server-config/{path}

Read the content of a configuration file. Only Gerrit administrators are allowed to read the content of a configuration file.

Request

  GET /plugins/server-config/etc/gerrit.config HTTP/1.0

As response the content of the configuration file gerrit.config is returned.

Response

  HTTP/1.1 200 OK
  Content-Type: application/octet-stream

  [gerrit]
    basePath = git
    canonicalWebUrl = ...
    ....

Write File

PUT /plugins/server-config/{path}

Update the content of a configuration file. Only Gerrit administrators are allowed to update the content of a configuration file. A server restart may be needed for some configuration changes to be taken into effect.

Request

  PUT /plugins/server-config/etc/gerrit.config HTTP/1.0

  [gerrit]
    basePath = git
    canonicalWebUrl = ...
    ....

Response

  HTTP/1.1 204 No Content