본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Konnect API 리소스 조회 명령

원문 보기 위키 갱신

Konnect API 리소스 조회 명령 (kongctl api get)

이 문서는 kongctl CLI의 api get 명령으로 Konnect API에 GET 요청을 보내 리소스를 조회하는 방법을 안내해요. 명령 기본 문법부터 base-url, body-file 같은 주요 플래그와 jq 표현식으로 응답을 필터링하는 옵션까지 차근차근 살펴볼 수 있어요. Konnect API를 CLI에서 직접 호출해 보고 싶은 분에게 딱 맞는 참고 자료예요

출처: 문서

본문

명령어 사용법

Usage:
  kongctl api get <endpoint> [flags]


Flags:
      --base-url string            Base URL for Konnect API requests.
                                   - Config path: [ konnect.base-url ]
                                   - Default   : [ https://us.api.konghq.com ]
  -f, --body-file string           Read request body from file ('-' to read from standard input)
      --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.
                                   - Environment variable: KONGCTL_CONFIG_FILE (overridden by this flag)
                                   - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
  -h, --help                       help for get
      --include-response-headers   Include response headers in error output
      --jq string                  Filter JSON responses using jq expressions (powered by gojq for full jq compatibility)
      --jq-color string            Controls colorized output for jq filter results.
                                   - Config path: [ jq.color.enabled ]
                                   - Allowed    : [ auto|always|never ] (default "auto")
      --jq-color-theme string      Select the color theme used for jq filter results.
                                   - Config path: [ jq.color.theme ]
                                   - Examples   : [ friendly, github-dark, dracula ]
                                   - Reference  : [ https://xyproto.github.io/splash/docs/ ] (default "friendly")
  -r, --jq-raw-output              Output string jq results without JSON quotes (like jq -r).
                                   - Config path: [ jq.raw-output ]
      --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 ]
      --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")
      --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 ]

관련 리소스

더 알아보기 (Learn more)

  • Konnect API 전체 목록과 각 API의 사용법을 확인할 수 있어요 — Konnect APIs
  • api get 외에 다른 kongctl api 하위 명령들도 함께 살펴보세요 — kongctl api commands