kongctl adopt identity

Uses: kongctl

Adopt Kong Identity resources using namespace labels or ownership metadata.

kongctl provides the following tools for adopting Kong Identity resources:

Command

Description

kongctl adopt identity auth-server Adopt a Kong Identity authorization server using labels.
kongctl adopt identity directory Adopt a Kong Identity directory using managed_by ownership metadata.
kongctl adopt identity group Adopt an ordinary Kong Identity group using managed_by ownership.
kongctl adopt identity principal Adopt a principal by UUID with a local ref.

Command usage

Usage:
  kongctl adopt identity [flags]
  kongctl adopt identity [command]

Aliases:
  identity, id

Available Commands:
  auth-server          Adopt a Kong Identity authorization server using labels
  directory            Adopt a Kong Identity directory using managed_by ownership metadata
  group                Adopt an ordinary Kong Identity group using managed_by ownership
  principal            Adopt a principal by UUID with a local ref


Flags:
      --base-url string         Base URL for Konnect API requests.
                                - Config path: [ konnect.base-url ]
                                - Default   : [ https://us.api.konghq.com ]
      --color-theme string      Configures the CLI UI/theme (prompt, tables, TUI elements).
                                - Config path: [ color-theme ]
                                - Examples   : [ auto, 0_x_96_f, 12_bit_rainbow, 13_th_floor, 3024_day ]
                                - List       : [ kongctl list themes ] (default "auto")
      --config-file string      Path to the configuration file to load.
                                - Environment variable: KONGCTL_CONFIG_FILE (overridden by this flag)
                                - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
  -h, --help                    help for identity
      --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")
      --namespace string        Namespace ownership metadata to apply to the resource (required)
      --no-telemetry            Disable telemetry for this command invocation. Overrides config and env.
                                - Config path: [ telemetry.enabled ]
                                - Env var    : [ KONGCTL_NO_TELEMETRY ]
                                - Default    : [ false ]
      --no-trunc                Preserve full cell widths in static text tables beyond terminal width.
                                Does not change column selection, UUID formatting, or explicit string slices.
                                - Config path: [ text.no-trunc ]
                                - Default    : [ false ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
      --overwrite-namespace     Overwrite existing namespace ownership metadata on the resource
      --pat string              Konnect Personal Access Token (PAT) used to authenticate the CLI.
                                Setting this value overrides tokens obtained from the login command.
                                - Config path: [ konnect.pat ]
  -p, --profile string          Specify the profile to use for this command. (default "default")
      --region string           Konnect region identifier (for example "eu"). Used to construct the base URL when --base-url is not provided.
                                - Config path: [ konnect.region ]
      --text-id-format string   Configure UUID rendering in static text-table ID columns.
                                - Config path: [ text.id-format ]
                                - Allowed    : [ compact|full ]
                                - Default    : [ compact ]
      --text-layout string      Configure static text-table column selection.
                                - Config path: [ text.layout ]
                                - Allowed    : [ compact|auto|wide ]
                                - Default    : [ compact ]

Use "kongctl adopt identity [command] --help" for more information about a command.

kongctl adopt identity auth-server

Adopt a Kong Identity authorization server using labels.

Usage:
  kongctl adopt identity auth-server <id|name> [flags]
  kongctl adopt identity auth-server [command]

Aliases:
  auth-server, auth-servers, auth_servers

Available Commands:
  client      Adopt an OAuth client using labels under an explicit authorization server


Flags:
      --base-url string         Base URL for Konnect API requests.
                                - Config path: [ konnect.base-url ]
                                - Default   : [ https://us.api.konghq.com ]
      --color-theme string      Configures the CLI UI/theme (prompt, tables, TUI elements).
                                - Config path: [ color-theme ]
                                - Examples   : [ auto, 0_x_96_f, 12_bit_rainbow, 13_th_floor, 3024_day ]
                                - List       : [ kongctl list themes ] (default "auto")
      --config-file string      Path to the configuration file to load.
                                - Environment variable: KONGCTL_CONFIG_FILE (overridden by this flag)
                                - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
  -h, --help                    help for auth-server
      --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")
      --namespace string        Namespace ownership metadata to apply to the resource (required)
      --no-telemetry            Disable telemetry for this command invocation. Overrides config and env.
                                - Config path: [ telemetry.enabled ]
                                - Env var    : [ KONGCTL_NO_TELEMETRY ]
                                - Default    : [ false ]
      --no-trunc                Preserve full cell widths in static text tables beyond terminal width.
                                Does not change column selection, UUID formatting, or explicit string slices.
                                - Config path: [ text.no-trunc ]
                                - Default    : [ false ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
      --overwrite-namespace     Overwrite existing namespace ownership metadata on the resource
      --pat string              Konnect Personal Access Token (PAT) used to authenticate the CLI.
                                Setting this value overrides tokens obtained from the login command.
                                - Config path: [ konnect.pat ]
  -p, --profile string          Specify the profile to use for this command. (default "default")
      --region string           Konnect region identifier (for example "eu"). Used to construct the base URL when --base-url is not provided.
                                - Config path: [ konnect.region ]
      --text-id-format string   Configure UUID rendering in static text-table ID columns.
                                - Config path: [ text.id-format ]
                                - Allowed    : [ compact|full ]
                                - Default    : [ compact ]
      --text-layout string      Configure static text-table column selection.
                                - Config path: [ text.layout ]
                                - Allowed    : [ compact|auto|wide ]
                                - Default    : [ compact ]

Use "kongctl adopt identity auth-server [command] --help" for more information about a command.

kongctl adopt identity directory

Adopt a Kong Identity directory using managed_by ownership metadata.

Usage:
  kongctl adopt identity directory <id|name> [flags]

Aliases:
  directory, directories


Flags:
      --base-url string         Base URL for Konnect API requests.
                                - Config path: [ konnect.base-url ]
                                - Default   : [ https://us.api.konghq.com ]
      --color-theme string      Configures the CLI UI/theme (prompt, tables, TUI elements).
                                - Config path: [ color-theme ]
                                - Examples   : [ auto, 0_x_96_f, 12_bit_rainbow, 13_th_floor, 3024_day ]
                                - List       : [ kongctl list themes ] (default "auto")
      --config-file string      Path to the configuration file to load.
                                - Environment variable: KONGCTL_CONFIG_FILE (overridden by this flag)
                                - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
  -h, --help                    help for directory
      --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")
      --namespace string        Namespace ownership metadata to apply to the resource (required)
      --no-telemetry            Disable telemetry for this command invocation. Overrides config and env.
                                - Config path: [ telemetry.enabled ]
                                - Env var    : [ KONGCTL_NO_TELEMETRY ]
                                - Default    : [ false ]
      --no-trunc                Preserve full cell widths in static text tables beyond terminal width.
                                Does not change column selection, UUID formatting, or explicit string slices.
                                - Config path: [ text.no-trunc ]
                                - Default    : [ false ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
      --overwrite-namespace     Overwrite existing namespace ownership metadata on the resource
      --pat string              Konnect Personal Access Token (PAT) used to authenticate the CLI.
                                Setting this value overrides tokens obtained from the login command.
                                - Config path: [ konnect.pat ]
  -p, --profile string          Specify the profile to use for this command. (default "default")
      --region string           Konnect region identifier (for example "eu"). Used to construct the base URL when --base-url is not provided.
                                - Config path: [ konnect.region ]
      --text-id-format string   Configure UUID rendering in static text-table ID columns.
                                - Config path: [ text.id-format ]
                                - Allowed    : [ compact|full ]
                                - Default    : [ compact ]
      --text-layout string      Configure static text-table column selection.
                                - Config path: [ text.layout ]
                                - Allowed    : [ compact|auto|wide ]
                                - Default    : [ compact ]

kongctl adopt identity group

Adopt an ordinary Kong Identity group using managed_by ownership.

Usage:
  kongctl adopt identity group <id|name> [flags]

Aliases:
  group, groups


Flags:
      --base-url string         Base URL for Konnect API requests.
                                - Config path: [ konnect.base-url ]
                                - Default   : [ https://us.api.konghq.com ]
      --color-theme string      Configures the CLI UI/theme (prompt, tables, TUI elements).
                                - Config path: [ color-theme ]
                                - Examples   : [ auto, 0_x_96_f, 12_bit_rainbow, 13_th_floor, 3024_day ]
                                - List       : [ kongctl list themes ] (default "auto")
      --config-file string      Path to the configuration file to load.
                                - Environment variable: KONGCTL_CONFIG_FILE (overridden by this flag)
                                - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
      --directory-id string     Parent directory UUID (overrides the default name)
      --directory-name string   Exact parent directory name.
                                - Default: [ default ]
  -h, --help                    help for group
      --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")
      --namespace string        Namespace ownership metadata to apply to the resource (required)
      --no-telemetry            Disable telemetry for this command invocation. Overrides config and env.
                                - Config path: [ telemetry.enabled ]
                                - Env var    : [ KONGCTL_NO_TELEMETRY ]
                                - Default    : [ false ]
      --no-trunc                Preserve full cell widths in static text tables beyond terminal width.
                                Does not change column selection, UUID formatting, or explicit string slices.
                                - Config path: [ text.no-trunc ]
                                - Default    : [ false ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
      --overwrite-namespace     Overwrite existing namespace ownership metadata on the resource
      --pat string              Konnect Personal Access Token (PAT) used to authenticate the CLI.
                                Setting this value overrides tokens obtained from the login command.
                                - Config path: [ konnect.pat ]
  -p, --profile string          Specify the profile to use for this command. (default "default")
      --region string           Konnect region identifier (for example "eu"). Used to construct the base URL when --base-url is not provided.
                                - Config path: [ konnect.region ]
      --text-id-format string   Configure UUID rendering in static text-table ID columns.
                                - Config path: [ text.id-format ]
                                - Allowed    : [ compact|full ]
                                - Default    : [ compact ]
      --text-layout string      Configure static text-table column selection.
                                - Config path: [ text.layout ]
                                - Allowed    : [ compact|auto|wide ]
                                - Default    : [ compact ]

kongctl adopt identity principal

Adopt a principal by UUID with a local ref.

Usage:
  kongctl adopt identity principal <id> [flags]
  kongctl adopt identity principal [command]

Aliases:
  principal, principals

Available Commands:
  basic-auth  Adopt a basic-auth username record using managed_by ownership
  identity    Adopt a principal identity with a parent principal UUID and a local ref


Flags:
      --base-url string         Base URL for Konnect API requests.
                                - Config path: [ konnect.base-url ]
                                - Default   : [ https://us.api.konghq.com ]
      --color-theme string      Configures the CLI UI/theme (prompt, tables, TUI elements).
                                - Config path: [ color-theme ]
                                - Examples   : [ auto, 0_x_96_f, 12_bit_rainbow, 13_th_floor, 3024_day ]
                                - List       : [ kongctl list themes ] (default "auto")
      --config-file string      Path to the configuration file to load.
                                - Environment variable: KONGCTL_CONFIG_FILE (overridden by this flag)
                                - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
      --directory-id string     Parent directory UUID (overrides the default name)
      --directory-name string   Exact parent directory name.
                                - Default: [ default ]
  -h, --help                    help for principal
      --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")
      --namespace string        Namespace ownership metadata to apply to the resource (required)
      --no-telemetry            Disable telemetry for this command invocation. Overrides config and env.
                                - Config path: [ telemetry.enabled ]
                                - Env var    : [ KONGCTL_NO_TELEMETRY ]
                                - Default    : [ false ]
      --no-trunc                Preserve full cell widths in static text tables beyond terminal width.
                                Does not change column selection, UUID formatting, or explicit string slices.
                                - Config path: [ text.no-trunc ]
                                - Default    : [ false ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
      --overwrite-namespace     Overwrite existing namespace ownership metadata on the resource
      --pat string              Konnect Personal Access Token (PAT) used to authenticate the CLI.
                                Setting this value overrides tokens obtained from the login command.
                                - Config path: [ konnect.pat ]
  -p, --profile string          Specify the profile to use for this command. (default "default")
      --ref string              Declarative ref to persist on this principal
      --region string           Konnect region identifier (for example "eu"). Used to construct the base URL when --base-url is not provided.
                                - Config path: [ konnect.region ]
      --text-id-format string   Configure UUID rendering in static text-table ID columns.
                                - Config path: [ text.id-format ]
                                - Allowed    : [ compact|full ]
                                - Default    : [ compact ]
      --text-layout string      Configure static text-table column selection.
                                - Config path: [ text.layout ]
                                - Allowed    : [ compact|auto|wide ]
                                - Default    : [ compact ]

Use "kongctl adopt identity principal [command] --help" for more information about a command.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!