Skip to main content

subjects

Overview

Namesubjects
TypeResource
Idconfluent.schema_registry.subjects

Fields

NameDatatypeDescription
idintegerGlobally unique identifier of the schema
metadataobjectUser-defined metadata
referencesarrayReferences to other schemas
ruleSetobjectSchema rule set
schemastringSchema definition string
schemaTypestringSchema type
subjectstringName of the subject
versionintegerVersion number

Methods

NameAccessible byRequired ParamsDescription
get_schema_by_versionSELECTsubject, versionRetrieves a specific version of the schema registered under this subject.
listSELECTRetrieves a list of registered subjects matching specified parameters.
delete_schema_versionDELETEsubject, versionDeletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema.
delete_subjectDELETEsubjectDeletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment.
get_referenced_byEXECsubject, versionRetrieves the IDs of schemas that reference the specified schema.
get_schema_only_1EXECsubject, versionRetrieves the schema for the specified version of this subject. Only the unescaped schema string is returned.
look_up_schema_under_subjectEXECsubjectCheck if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name.
registerEXECsubjectRegister 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.