ccloud schema-registry schema create


Create a schema.

ccloud schema-registry schema create --subject <subject> --schema <schema-file> --type <schema-type> --refs <ref-file> [flags]


-S, --subject string       REQUIRED: Subject of the schema.
    --schema string        REQUIRED: The path to the schema file.
    --type string          Specify the schema type as "AVRO", "PROTOBUF", or "JSON".
    --refs string          The path to the references file.
-o, --output string        Specify the output format as "human", "json", or "yaml". (default "human")
    --api-key string       API key.
    --api-secret string    API key secret.
    --environment string   Environment ID.
    --context string       CLI context name.

Global Flags

-h, --help            Show help for this command.
-v, --verbose count   Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).


Register a new schema:

ccloud schema-registry schema create --subject payments --schema schemafilepath

Where schemafilepath may include these contents:

      "type" : "record",
      "namespace" : "Example",
      "name" : "Employee",
      "fields" : [
              { "name" : "Name" , "type" : "string" },
              { "name" : "Age" , "type" : "int" }

For more information on schema types, see

For more information on schema references, see

See Also