List the custom plugins of a gateway group
GET /api/gateway_groups/{gateway_group_id}/custom_plugins
GET /api/gateway_groups/{gateway_group_id}/custom_pluginsInteractive request editor loads with JavaScript.
In: header
Path Parameters
Gateway group ID.
1 <= lengthQuery Parameters
Page number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueNumber of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueOrder to list the resources by. The sorting index follows the configuration of order_by.
"desc"Value in
- "asc"
- "desc"
Index to order resources by.
"updated_at"Value in
- "created_at"
- "updated_at"
Condition to search resources by.
Name of the resource.
Response Body
application/json
curl -X GET "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/custom_plugins?search=version%253Dv2"Successfully retrieved the paginated list of custom plugins.
{
"total": 1,
"list": [
{
"gateway_group_id": "bc1b95c9-b348-4832-acc3-e257d2342df1",
"name": "route-id-register",
"version": "0.2",
"source_code": "local core = require(\"apisix.core\")\nlocal ngx = ngx\n\nlocal schema = {\n type = \"object\"\n}\n\nlocal plugin_name = \"route-id-register\"\n\nlocal _M = {\n version = 0.2,\n priority = 1,\n name = plugin_name,\n schema = schema,\n scope = \"global\",\n}\n\nfunction _M.check_schema(conf)\n return core.schema.check(schema, conf);\nend\n\nfunction _M.log(conf, ctx)\n if ctx.var.route_id then\n ngx.var.route_id = ctx.var.route_id\n end\nend\n\nreturn _M\n",
"file": "bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo=",
"package": "string",
"catalog": "General",
"description": "This plugin records the matched route’s ID into an Nginx variable ($route_id) for use in logging and monitoring.",
"documentation_link": "https://docs.api7.ai/hub/route-id-register",
"author": "plugindev",
"logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII=",
"is_obfuscated": false,
"created_at": 1742288232,
"updated_at": 1742288235
}
]
}Invalid arguments. Error details will be provided in the response.
Complete operation details and schema variants
GET /api/gateway_groups/{gateway_group_id}/custom_plugins
List the custom plugins of a gateway group
List the custom plugins the gateway group runs. Use pagination and search parameters to locate plugins by name.
Required IAM Permission: Action gateway:GetCustomPlugin, Resource arn:api7:gateway:gatewaygroup/{gateway_group_id}
Parameters
gateway_group_id(path, string, required): Gateway group ID.page(query, integer, optional): Page number of the listed resources. Used together withpage_size. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.page_size(query, integer, optional): Number of resources listed per page. Used together withpage. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.direction(query, string, optional): Order to list the resources by. The sorting index follows the configuration oforder_by.order_by(query, string, optional): Index to order resources by.search(query, string, optional): Condition to search resources by.name(query, string, optional): Name of the resource.
Responses
200: Successfully retrieved the paginated list of custom plugins.- allOf variant 1
list(array, optional): An array of resources.total(integer, optional): Total number of objects.- allOf variant 2
list(array, optional): Array of custom plugins.list[].gateway_group_id(string, optional): The gateway group ID.list[].name(string, optional): The name of the plugin.list[].version(string, optional): The version of the plugin.list[].source_code(string, optional): The source code for the plugin.list[].file(string, optional): Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata. A plugin that has dependency files holds $PLUGIN_NAME.lua alongside a $PLUGIN_NAME directory of Lua files.list[].package(string, optional): Base64-encoded tar.gz holding the plugin entry file and its dependency files, which the data plane loads as one unit. Omitted for a plugin that is a single file.list[].catalog(string, optional): Plugin category, such as "Traffic" or "Observability".list[].description(string, optional): A brief description of the plugin.list[].documentation_link(string, optional): Link to the plugin's documentation.list[].author(string, optional): Author of the plugin.list[].logo(string, optional): The base64-encoded logo image.list[].is_obfuscated(boolean, optional): Whether the custom plugin’s source code is obfuscated into bytecode.list[].created_at(integer, optional): The object created timestamp.list[].updated_at(integer, optional): The object updated timestamp.400: Invalid arguments. Error details will be provided in the response.
cURL
curl -X GET '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/custom_plugins'