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

Config Endpoints

Get Menus

GET /config/{server}/@PLUGIN@~menus/

Gets the additional menus entries.

Request

  GET /config/server/@PLUGIN@~menus/ HTTP/1.0

As response a list of TopMenuEntryInfo entities is returned that describe the additional menu entries.

Response

  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "name": "Gerrit",
      "items": [
        {
          "url": "http://code.google.com/p/gerrit/",
          "name": "Homepage"
        }
      ]
    }
  ]

Set Menus

PUT /config/{server}/@PLUGIN@~menus/

Sets the additional menus entries. Any additional menu entries which have been set before are overwritten.

The additional menu entries must be provided in the request body as a MenusInput entity.

Request

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

  {
    "menus": [
      {
        "name": "Gerrit",
        "items": [
          {
            "url": "http://code.google.com/p/gerrit/",
            "name": "Homepage"
          }
        ]
      }
    ]
  }

As response a list of TopMenuEntryInfo entities is returned that describe the additional menu entries.

Response

  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "name": "Gerrit",
      "items": [
        {
          "url": "http://code.google.com/p/gerrit/",
          "name": "Homepage"
        }
      ]
    }
  ]

JSON Entities

MenusInput

The MenusInput entity contains information about additional menu entries.