Skip to content
  • Auto
  • Light
  • Dark

Retrieve Subject

Retrieve Schema Registry Configuration for a Subject of kafka Cluster
databases.schema_registry.config.retrieve_subject(strsubject_name, ConfigRetrieveSubjectParams**kwargs) -> ConfigRetrieveSubjectResponse
get/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}

To retrieve the Schema Registry configuration for a Subject of a Kafka cluster, send a GET request to /v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME. The response is a JSON object with a compatibility_level key, which is set to an object containing any database configuration parameters.

ParametersExpand Collapse
database_cluster_uuid: str
subject_name: str
ReturnsExpand Collapse
class ConfigRetrieveSubjectResponse:
compatibility_level: Literal["NONE", "BACKWARD", "BACKWARD_TRANSITIVE", 4 more]

The compatibility level of the schema registry.

Accepts one of the following:
"NONE"
"BACKWARD"
"BACKWARD_TRANSITIVE"
"FORWARD"
"FORWARD_TRANSITIVE"
"FULL"
"FULL_TRANSITIVE"
subject_name: str

The name of the schema subject.

Retrieve Schema Registry Configuration for a Subject of kafka Cluster
from gradient import Gradient

client = Gradient()
response = client.databases.schema_registry.config.retrieve_subject(
    subject_name="customer-schema",
    database_cluster_uuid="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
)
print(response.compatibility_level)
{
  "compatibility_level": "NONE",
  "subject_name": "subject_name"
}
Returns Examples
{
  "compatibility_level": "NONE",
  "subject_name": "subject_name"
}