Plugins

Get a Plugin using ID.

get/{workspace}/plugins/{PluginId}

Request

  • Base URL
    http://localhost:8001
  • Auth
    API key in header Kong-Admin-Token

Path parameters

PluginId, string required

ID of the Plugin to lookup

workspace, string required
Example:team-payments

The name of the workspace

Response

Successfully fetched Plugin

Plugin required

A Plugin entity represents a plugin configuration that will be executed during the HTTP request/response lifecycle. It is how you can add functionalities to Services that run behind Kong, like Authentication or Rate Limiting for example. You can find more information about how to install and what values each plugin takes by visiting the Kong Hub. When adding a Plugin Configuration to a Service, every request made by a client to that Service will run said Plugin. If a Plugin needs to be tuned to different values for some specific Consumers, you can do so by creating a separate plugin instance that specifies both the Service and the Consumer, through the service and consumer fields.

condition, string nullable

An expression used for conditional control over plugin execution. If the expression evaluates to true during the request flow, the plugin is executed; otherwise, it is skipped.

config, object nullable

The configuration properties for the Plugin which can be found on the plugins documentation page in the Kong Hub.

consumer, object nullable

If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.

consumer_group, object nullable

If set, the plugin will activate only for requests where the specified group has been authenticated.

created_at, integer nullable

Unix epoch when the resource was created.

enabled, boolean nullable

Whether the plugin is applied.

id, string nullable

A string representing a UUID (universally unique identifier).

instance_name, string nullable

A unique string representing a UTF-8 encoded name.

name, string required

The name of the Plugin that's going to be added. Currently, the Plugin must be installed in every Kong instance separately.

ordering, object nullable
partials, object[] nullable

A list of partials to be used by the plugin.

protocols, string[] nullable

A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support "tcp" and "tls".

route, object nullable

If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the Route being used.

service, object nullable

If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.

tags, string[] nullable

An optional set of strings associated with the Plugin for grouping and filtering.

updated_at, integer nullable

Unix epoch when the resource was last updated.

Example response

{
  "config": {
    "anonymous": null,
    "hide_credentials": false,
    "key_in_body": false,
    "key_in_header": true,
    "key_in_query": true,
    "key_names": [
      "apikey"
    ],
    "run_on_preflight": true
  },
  "enabled": true,
  "id": "3fd1eea1-885a-4011-b986-289943ff8177",
  "name": "key-auth",
  "partials": [
    {
      "id": "cff1230a-00f7-4ae8-b376-c370f0eb4dae",
      "name": "foo-partial",
      "path": "config.redis"
    },
    {
      "id": "129ee345-cba8-4e55-9d6d-93c223ff91ae",
      "name": "bar-partial",
      "path": "config.redis"
    }
  ],
  "protocols": [
    "grpc",
    "grpcs",
    "http",
    "https"
  ]
}

Changes