rpk registry schema get

Get a schema by version, ID, or by an existing schema.

This returns a lookup of an existing schema or schemas in one of a few potential (mutually exclusive) ways:

  • By version, returning a schema for a required subject and version

  • By ID, returning all subjects using the schema, or filtering for one subject

  • By schema, checking if the schema has been created in the subject

To print the schema, use the --print-schema flag.

To print schema metadata properties, use the --print-metadata flag.

Usage

rpk registry schema get <subject> [flags]

Flags

Value Type Description

--deleted

bool

If true, also return deleted schemas.

--id

int

ID to lookup schemas usages of; subject optional.

--print-metadata

bool

Print the schema metadata properties.

--print-schema

bool

Prints the schema in JSON format.

--schema

string

Schema file to check existence of. Must be .avro, .json, or .proto. Subject is required.

--schema-version

string

Schema version to lookup (latest, 0, 1…​); subject required.

--type

string

Schema type of the file used to lookup (avro,protobuf,json); overrides schema file extension.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.