Skip to main content
Version: 2.14

APISIX variable

Besides Nginx variable, APISIX also provides additional variables.

List in alphabetical order:

Variable NameOriginDescriptionExample
balancer_ipcorethe IP of picked upstream server1.1.1.1
balancer_portcorethe port of picked upstream server80
consumer_namecoreusername of consumer
graphql_namecorethe operation name of GraphQLHeroComparison
graphql_operationcorethe operation type of GraphQLmutation
graphql_root_fieldscorethe top level fields of GraphQL["hero"]
mqtt_client_idmqtt-proxythe client id in MQTT protocol
route_idcoreid of route
route_namecorename of route
service_idcoreid of service
service_namecorename of service
rpc_timexRPCtime spent at the rpc request level

You can also register your own variable.