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.
POST /config/server/@PLUGIN@~serviceusers/{username}
Creates a service user.
The public SSH key for creating the service user must be specified in the request body as a ServiceUserInput entity.
Caller must be a member of a group that is granted the ‘Create Service User’ capability (provided by this plugin) or the ‘Administrate Server’ capability.
PUT /config/server/@PLUGIN@~serviceusers/JenkinsVoter HTTP/1.0 Content-Type: application/json;charset=UTF-8 { "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==" }
As response a detailed AccountInfo entity is returned that describes the created account.
HTTP/1.1 201 Created Content-Disposition: attachment Content-Type: application/json;charset=UTF-8 )]}' { "_account_id": 1000195, "name": "JenkinsVoter", "avatars": [] }
GET /config/server/@PLUGIN@~serviceusers/_
Lists service users.
In order to see a service user the caller must have created that service user or be a member of a group that is granted the ‘Administrate Server’ capability.
GET /config/server/@PLUGIN@~serviceusers/ HTTP/1.0
As response a map is returned that maps the username to a ServiceUserInfo entity. The username in ServiceUserInfo is not set since it is already available as map key.
HTTP/1.1 201 Created Content-Disposition: attachment Content-Type: application/json;charset=UTF-8 )]}' { "GlobalVerifier": { "created_by": "jdoe", "created_at": "Mon, 27 Jan 2014 21:00:12 +0100", "_account_id": 1000107, "name": "GlobalVerifier", "avatars": [] }, "JenkinsVoter": { "created_by": "jdoe", "created_at": "Thu, 21 Nov 2013 15:00:55 +0100", "_account_id": 1000195, "name": "JenkinsVoter", "avatars": [] } }
GET /config/server/@PLUGIN@~config
Gets the configuration of the @PLUGIN@ plugin.
GET /config/server/@PLUGIN@~config HTTP/1.0
As response a ConfigInfo entity is returned that contains the configuration.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json;charset=UTF-8 )]}' { "on_success": "Don\u0027t forget to assign \u003ca href\u003d\"Documentation/access-control.html\"\u003eaccess rights\u003c/a\u003e to the service user." }
PUT /config/server/@PLUGIN@~config
Sets the configuration of the @PLUGIN@ plugin.
The new configuration must be specified as a ConfigInfo entity in the request body. Not setting a parameter leaves the parameter unchanged.
PUT /config/server/@PLUGIN@~config HTTP/1.0 Content-Type: application/json;charset=UTF-8 { "info": "Please find more information about service users in the <a href\"wiki.html\">wiki</a>." }
The ConfigInfo
entity contains configuration of the @PLUGIN@ plugin.
false
).The ServiceUserInfo
entity contains information about a service user. It has the same fields as a detailed AccountInfo and in addition the following fields:
The ServiceUserInput
entity contains options for creating a service user.
Part of Gerrit Code Review