Subjects (v1)

Register schema under a subject

Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema's version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed.

post/subjects/{subject}/versions

Path parameters

subjectstring required

Name of the subject

Query parameters

normalizeboolean

Whether to register the normalized schema

formatstring

Desired output format, dependent on schema type. For AVRO schemas, valid values are: " " (default) or "resolved". For PROTOBUF schemas, valid values are: " " (default), "ignore_extensions", or "serialized" (The parameter does not apply to JSON schemas.)

Request body

versioninteger

Version number

idinteger

Globally unique identifier of the schema

schemaTypestring

Schema type

schemastring

Schema definition string

propagateSchemaTagsboolean

Example request

{
  "references": [
    {
      "name": "io.confluent.kafka.example.User",
      "subject": "User",
      "version": 1
    }
  ]
}

Response

Schema successfully registered.

Changes

No recorded changes to this endpoint across all 1 revision of this API.