Export current Konnect resource state to various formats.
kongctl dump
Uses:
kongctl
Related Documentation
Incompatible with
on-prem
Related Resources
Examples
Export all APIs with their child resources to tf-import format:
kongctl dump tf-import --resources=api --include-child-resourcesCopied!
Export all portal and api resources to kongctl declarative configuration and the team-alpha namespace:
kongctl dump declarative --resources=portal,api --default-namespace=team-alphaCopied!
For custom dashboards created in the Konnect UI, adopt the dashboard first, then dump it with the same namespace:
kongctl adopt analytics dashboard 22cd8a0b-72e7-4212-9099-0764f8e9c5ac \
--namespace analytics
kongctl dump declarative --resources=analytics.dashboards \
--default-namespace=analytics > dashboards.yaml
kongctl plan -f dashboards.yaml --mode applyCopied!
Subcommands
kongctl provides the following tools for exporting configurations:
|
Command |
Description |
|---|---|
| kongctl dump declarative | Export declarative configuration. |
| kongctl dump tf-import | Export for Terraform import. |
Command usage
Usage:
kongctl dump [flags]
kongctl dump [command]
Aliases:
dump, d, D
Examples:
# Export all portals as Terraform import blocks to stdout
kongctl dump tf-import --resources=portal
# Export all portals and their child resources (documents, specifications, pages, settings)
kongctl dump tf-import --resources=portal --include-child-resources
# Export all portals as Terraform import blocks to a file
kongctl dump tf-import --resources=portal --output-file=portals.tf
# Export all APIs with their child resources and include debug logging
kongctl dump tf-import --resources=api --include-child-resources --log-level=debug
# Export declarative configuration with a default namespace
kongctl dump declarative --resources=portal,api --default-namespace=team-alpha
# Export adopted dashboards as declarative configuration
kongctl dump declarative --resources=analytics.dashboards --default-namespace=analytics
# Export all organization teams
kongctl dump declarative --resources=organization.teams
# Filter by name (exact match)
kongctl dump declarative --resources=portal --filter-name=my-dev-portal
# Filter by name (substring match using wildcards)
kongctl dump declarative --resources=portal --filter-name='*dev*'
# Filter by ID
kongctl dump declarative --resources=portal --filter-id=abc12345-def6-7890-abcd-ef1234567890
Available Commands:
declarative Export resources as kongctl declarative configuration
tf-import Export resources as Terraform import blocks
Flags:
--color-theme string Configures the CLI UI/theme (prompt, tables, TUI elements).
- Config path: [ color-theme ]
- Examples : [ auto, 3024_day, 3024_night, aardvark_blue, abernathy ]
- Reference : [ https://github.com/lrstanley/bubbletint/blob/master/DEFAULT_TINTS.md ] (default "auto")
--config-file string Path to the configuration file to load.
- Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
-h, --help help for dump
--log-file string Write execution logs to the specified file instead of STDERR.
- Config path: [ log-file ]
--log-level string Configures the logging level. Execution logs are written to STDERR.
- Config path: [ log-level ]
- Allowed : [ trace|debug|info|warn|error ] (default "error")
--no-telemetry Disable telemetry for this command invocation. Overrides config and env.
- Config path: [ telemetry.enabled ]
- Env var : [ KONGCTL_NO_TELEMETRY ]
- Default : [ false ]
-o, --output string Configures the format of data written to STDOUT.
- Config path: [ output ]
- Allowed : [ json|yaml|text ] (default "text")
-p, --profile string Specify the profile to use for this command. (default "default")
Use "kongctl dump [command] --help" for more information about a command.
Copied!