Get schema definition of a plugin
GET /apisix/admin/plugins/{plugin_name}
GET /apisix/admin/plugins/{plugin_name}Interactive request editor loads with JavaScript.
In: header
Path Parameters
Name of the plugin.
1 <= length <= 64Query Parameters
Gateway group ID.
1 <= lengthThe scope of the returned plugin information. By default, the scope is not set. When set to all, the response includes metadata_schema, priority, version, - and wraps the actual schema under the schema field.
Value in
- "all"
Type to filter the plugin list. http will only show L7 plugins and stream will only show L4 plugins.
"http"Value in
- "http"
- "stream"
Response Body
application/json
curl -X GET "$API_BASE_URL/apisix/admin/plugins/string"Successfully retrieved the JSON schema for the specified plugin.
{
"value": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"_meta": {
"properties": {
"disable": {
"type": "boolean"
},
"error_response": {
"oneOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"filter": {
"description": "filter determines whether the plugin needs to be executed at runtime",
"type": "array"
},
"pre_function": {
"description": "function to be executed in each phase before execution of plugins. The pre_function will have access to two arguments: `conf` and `ctx`.",
"type": "string"
},
"priority": {
"description": "priority of plugins by customized order",
"type": "integer"
}
},
"type": "object"
},
"prefer_name": {
"default": false,
"type": "boolean"
}
},
"type": "object"
}
}Complete operation details and schema variants
GET /apisix/admin/plugins/{plugin_name}
Get schema definition of a plugin
Get schema definition of a plugin, including plugin meta properties and plugin properties.
The endpoint returns the same response as the /apisix/admin/schema/plugins/{plugin_name} endpoint when scope is not set.
Parameters
-
gateway_group_id(query, string, optional): Gateway group ID. -
plugin_name(path, string, required): Name of the plugin. -
scope(query, string, optional): The scope of the returned plugin information. By default, the scope is not set. When set toall, the response includesmetadata_schema,priority,version, - and wraps the actual schema under theschemafield. -
subsystem(query, string, optional): Type to filter the plugin list.httpwill only show L7 plugins andstreamwill only show L4 plugins.
Responses
200: Successfully retrieved the JSON schema for the specified plugin.- allOf variant 1
value(object, optional): The specific resource.- allOf variant 2
value(object, optional): The plugin schema definition.
cURL
curl -X GET '$API_BASE_URL/apisix/admin/plugins/{plugin_name}'