Skip to content
  • Auto
  • Light
  • Dark

Update Subject

Update Schema Registry Configuration for a Subject of kafka Cluster
client.databases.schemaRegistry.config.updateSubject(stringsubjectName, ConfigUpdateSubjectParams { database_cluster_uuid, compatibility_level } params, RequestOptionsoptions?): ConfigUpdateSubjectResponse { compatibility_level, subject_name }
put/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}

To update the Schema Registry configuration for a Subject of a Kafka cluster, send a PUT 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
subjectName: string
params: ConfigUpdateSubjectParams { database_cluster_uuid, compatibility_level }
database_cluster_uuid: string

Path param: A unique identifier for a database cluster.

formatuuid
compatibility_level: "NONE" | "BACKWARD" | "BACKWARD_TRANSITIVE" | 4 more

Body param: The compatibility level of the schema registry.

Accepts one of the following:
"NONE"
"BACKWARD"
"BACKWARD_TRANSITIVE"
"FORWARD"
"FORWARD_TRANSITIVE"
"FULL"
"FULL_TRANSITIVE"
ReturnsExpand Collapse
ConfigUpdateSubjectResponse { compatibility_level, subject_name }
compatibility_level: "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: string

The name of the schema subject.

Update Schema Registry Configuration for a Subject of kafka Cluster
import Gradient from '@digitalocean/gradient';

const client = new Gradient();

const response = await client.databases.schemaRegistry.config.updateSubject('customer-schema', {
  database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30',
  compatibility_level: 'BACKWARD',
});

console.log(response.compatibility_level);
{
  "compatibility_level": "NONE",
  "subject_name": "subject_name"
}
Returns Examples
{
  "compatibility_level": "NONE",
  "subject_name": "subject_name"
}