The a7 plugin-metadata command allows you to manage API7 Enterprise Edition (EE) plugin metadata.
Plugin metadata is configured per plugin name and is scoped to a specific gateway group. It is stored at /apisix/admin/plugin_metadata/{plugin_name} within the targeted gateway group.
Unlike other resources, plugin metadata does not have a list endpoint. Operations are performed by specifying the plugin name directly.
All plugin metadata commands require the --gateway-group (or -g) flag to specify the target gateway group.
Gets metadata for a specific plugin by name.
| Flag | Short | Default | Description |
|---|---|---|---|
--gateway-group |
-g |
Target gateway group name (required) | |
--token |
-t |
API token (can be set via A7_TOKEN) | |
--output |
-o |
yaml |
Output format (json, yaml) |
Examples:
Get metadata for the syslog plugin in the default gateway group:
a7 plugin-metadata get syslog -g defaultGet metadata in JSON format:
a7 plugin-metadata get syslog -g default -o jsonCreates or sets plugin metadata for a plugin from a JSON or YAML file.
| Flag | Short | Default | Description |
|---|---|---|---|
--gateway-group |
-g |
Target gateway group name (required) | |
--file |
-f |
Path to the plugin metadata file (required) | |
--token |
-t |
API token | |
--output |
-o |
yaml |
Output format (json, yaml) |
Examples:
Create metadata for syslog from a JSON file:
a7 plugin-metadata create syslog -g default -f metadata.jsonCreate metadata for syslog from a YAML file:
a7 plugin-metadata create syslog -g prod -f metadata.yamlUpdates existing plugin metadata for a plugin using a JSON or YAML file.
| Flag | Short | Default | Description |
|---|---|---|---|
--gateway-group |
-g |
Target gateway group name (required) | |
--file |
-f |
Path to the plugin metadata file (required) | |
--token |
-t |
API token | |
--output |
-o |
yaml |
Output format (json, yaml) |
Examples:
Update metadata for syslog:
a7 plugin-metadata update syslog -g default -f metadata-updated.jsonDeletes plugin metadata for a specific plugin name.
| Flag | Short | Default | Description |
|---|---|---|---|
--gateway-group |
-g |
Target gateway group name (required) | |
--token |
-t |
API token | |
--force |
false |
Skip confirmation prompt |
Examples:
Delete metadata for syslog with confirmation:
a7 plugin-metadata delete syslog -g defaultDelete metadata for syslog without confirmation:
a7 plugin-metadata delete syslog -g default --forceThe following environment variables can be used to configure the a7 CLI for plugin metadata operations:
| Environment Variable | Description |
|---|---|
A7_SERVER |
API7 EE Control Plane URL (e.g., https://localhost:7443) |
A7_TOKEN |
API token for authentication |
A7_GATEWAY_GROUP |
Default gateway group to use if --gateway-group is omitted |
Create a syslog-metadata.yaml file:
log_format:
host: "$host"
request_id: "$request_id"
client_ip: "$remote_addr"Apply the metadata to the default gateway group:
a7 plugin-metadata create syslog -g default -f syslog-metadata.yaml