Creating REST plugin configurations

3 minute readExtensibilityDeveloper productivity

Plugin configurations are sets of parameters that can be applied across some, or all, plugin procedures. They can reduce the repetition of common values, create predefined parameter sets, and securely store credentials. Each configuration is given a unique name that is entered in the designated parameter for the plugin procedures that use them. The following steps illustrate how to create a plugin configuration that can be used by one or more plugin procedures.

To create a plugin configuration:

  1. Navigate to DevOps Essentials  Plugin Management  Plugin configurations.

  2. Select Add plugin configuration to create a new configuration.

  3. In the New Configuration window, specify a Name for the configuration.

  4. Select the Project that the configuration belongs to.

  5. Optionally, add a Description for the configuration.

  6. Select the appropriate Plugin for the configuration.

  7. Configure the plugin configuration parameters.

  8. Select OK.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

REST plugin configuration parameters

Table 1. EC-Rest plugin configuration parameters
Parameter Description

Configuration name

Required. The name for the created configuration.

Description

Description of the configuration.

URL base

Required. Base URL for REST requests. For example, https://example.com/rest/v1.0.

Port

Server port. Leave empty to use the default port for the provided scheme.

Default request timeout

Default REST client request timeout in seconds. 180s is used if not specified.

Customize protocols

Customize protocols for transport negotiation.

HTTP/2

Use protocol HTTP/2.0 for transport negotiation.

HTTP/1.1

Use protocol HTTP/1.1 for transport negotiation.

HTTP/2 with prior knowledge

Use protocol HTTP/2 with prior knowledge for transport negotiation.

Ignore SSL issues

Turns SSL verification off for instances with self-signed certificates.

Auth type

Authentication types:

  • anonymous

  • basic

  • bearer token

  • custom header/prefix

Login as

The credential for basic authentication.

Bearer token

The credential for bearer authentication.

Authentication header

The credential for the custom authentication header or prefix. For example:

  • GitHub PAT: Authorization: Token ghp_XXXXXXXXXXXXXXXXXXXXXXXXX.

    • In the Authorization header field, add the header: Authorization.

    • In the Secret value and Repeat Password fields, add the secret value: Token ghp_XXXXXXXXXXXXXXXXXXXXXXXXX.

  • Octopus Deploy: X-Octopus-ApiKey: API-XXXXXXXXXXXXXXXXXXXXXXXXX.

    • In the Authorization header field, add the header: X-Octopus-ApiKey.

    • In the Secret value and Repeat Password fields, add the secret value: API-XXXXXXXXXXXXXXXXXXXXXXXXX.

Default request content type

Default REST client request content type.

Default accepted MIME types.

Indicates which content types, expressed as MIME types, the client can understand.

Initial path URL

Relative URL Path. For example, service.

Default query options

Newline-separated request query options in format option_name=option_value.

Default headers

Provide the headers required for the request. Used to check the connection. For more than one header, write each header on a new line. Key-value pairs may be written separated by a whitespace, colon, or equals. Example (note that each key-value pair must appear on a new line):

simple_header simple_value header3:third myHeader=myValue

Fields used only to check connections

Path URL

Relative URL Path. Used to check connection. For example, service.

Query options

Newline-separated request query options in the following format option_name=option_value.

Content type

Content type required for the request. Used to check the connection. Examples:

  • text/plain

  • application/json; charset=utf-8

Cookie value

Value sent as a cookie. Used for checking the connection. Example:

  • foo1=bar1;foo2=bar2

Headers

Provide the headers required for the request. Used to check the connection. For more than one header, write each header on a new line. Key-value pairs may be written separated by a whitespace, colon, or equals. Example (note that each key-value pair must appear on a new line):

simple_header simple_value header3:third myHeader=myValue

Form content

Provide the content required for the request. For example: {"key" : "value", "tag" : "ttt", "level" : 1}

Request type

Includes the following options: GET, POST, PUT, PATCH, HEAD, or DELETE.

HTTP proxy

A proxy server URL that should be used for connections.

Proxy authorization

The username and password for the proxy.

Debug level

This option sets the debug level for logs. If Info is selected, only a summary is displayed. If Debug is selected, debug information is displayed. If Trace is selected, all requests and responses are displayed.