Get a global rule on a gateway group
GET /apisix/admin/global_rules/{global_rule_id}
GET /apisix/admin/global_rules/{global_rule_id}Interactive request editor loads with JavaScript.
X-API-KEY<token>
In: header
Path Parameters
global_rule_id*string
The unique identifier of the global rule.
Match
^[a-zA-Z0-9-_.]+$Length
1 <= length <= 256Query Parameters
gateway_group_id*string
Gateway group ID. Optional when using the gateway group admin key to authenticate.
Length
1 <= lengthResponse Body
application/json
application/json
curl -X GET "$API_BASE_URL/apisix/admin/global_rules/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"Successfully retrieved the global rule.
{
"value": {
"plugins": {
"key-auth": {}
},
"id": "key-auth",
"gateway_group_id": "bc1b95c9-b348-4832-acc3-e257d2342df1",
"created_at": 1742288232,
"updated_at": 1742288235
}
}Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
GET /apisix/admin/global_rules/{global_rule_id}
Get a global rule on a gateway group
Retrieve one global rule in the gateway group, including its plugin configuration and execution settings.
Required IAM Permission: Action gateway:GetGlobalPluginRule, Resource arn:api7:gateway:gatewaygroup/%s
Parameters
gateway_group_id(query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.global_rule_id(path, string, required): The unique identifier of the global rule.
Responses
200: Successfully retrieved the global rule.- allOf variant 1
value(object, optional): The specific resource.- allOf variant 2
value(object, optional): The global rule with management fields.- allOf variant 1
value.plugins(object, required): Key-value pairs of plugins and their configurations on the object.- allOf variant 2
value.id(string, optional): Name of the plugin.value.gateway_group_id(string, optional): The gateway group ID.value.created_at(integer, optional): The object created timestamp.value.updated_at(integer, optional): The object updated timestamp.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X GET '$API_BASE_URL/apisix/admin/global_rules/{global_rule_id}'